1. iframe 元素会创建包含另外一个文档的内联框架(即行内框架)。
2.hr :一条线
3.
placeholder 属性提供可描述输入字段预期值的提示信息(hint)。
该提示会在输入字段为空时显示,并会在字段获得焦点时消失。
注释:placeholder 属性适用于以下的 <input> 类型:text, search, url, telephone, email 以及 password。
4.display:flex
display:flex 是一种布局方式。它即可以应用于容器中,也可以应用于行内元素。是W3C提出的一种新的方案,可以简便、完整、响应式地实现各种页面布局。目前,它已经得到了所有浏览器的支持。
Flex是Flexible Box的缩写,意为"弹性布局",用来为盒状模型提供最大的灵活性。设为Flex布局以后,子元素的float、clear和vertical-align属性将失效。
5.outline-style: 属性用于设置元素的整个轮廓的样式,样式是none,轮廓不会显示
6. 当元素获得焦点时,发生 focus 事件
7.vertical-align: middle; 垂直居中对齐
8./* 对齐方式 */
justify-content: center; /* 居中排列 */
justify-content: start; /* 从行首开始排列 */
justify-content: end; /* 从行尾开始排列 */
justify-content: flex-start; /* 从行首起始位置开始排列 */
justify-content: flex-end; /* 从行尾位置开始排列 */
justify-content: left; /* 一个挨一个在对齐容器得左边缘 */
justify-content: right; /* 元素以容器右边缘为基准,一个挨着一个对齐, */
/* 基线对齐 */
justify-content: baseline;
justify-content: first baseline;
justify-content: last baseline;
/* 分配弹性元素方式 */
justify-content: space-between; /* 均匀排列每个元素
首个元素放置于起点,末尾元素放置于终点 */
justify-content: space-around; /* 均匀排列每个元素
每个元素周围分配相同的空间 */
justify-content: space-evenly; /* 均匀排列每个元素
每个元素之间的间隔相等 */
justify-content: stretch; /* 均匀排列每个元素
'auto'-sized 的元素会被拉伸以适应容器的大小 */
/* 溢出对齐方式 */
justify-content: safe center;
justify-content: unsafe center;
/* 全局值 */
justify-content: inherit;
justify-content: initial;
justify-content: unset;
1.> : >
2.text-decoration-:属性规定文本修饰要使用的线条类型。
(1) none 默认值,规定文本修饰没有线条
(2)underline 规定文本的下方将显示一条线
(3)overline 规定文本的上方方将显示一条线
(4)line-through 规定文本的中间将显示一条线
(5)initial 设置该属性为它的默认值
(6) inherit 从父元素继承该属性
3. nth-child(n)选择器:用于匹配父元素索引为n的子元素,即选取属于其父元素的第N个子元素,不论元素的类型。(n可以是数字、关键词(Odd 和 even)或公式。)
4. 文本过长不换行显示省略号的全部代码:
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
5.swiper轮播图
border-color: 设置边框颜色
position: absolute 绝对定位
position:relative 相对定位
border-bottom: 1px dotted #CCCCCC:下划线 dotted 虚线
font-weight: bolder:定义字体粗细的属性
bold 定义粗体字符。 bolder 定义更粗的字符 normal 字体的粗细: 中等
text-align: center; 设置居中
:first-child: 伪类向元素的第一个子元素添加样式。
marign: 设置top bottom
font-size:设置字体大小
font-weight:属性设置文本的粗细
text-indent: 2em: /*text-indent 属性规定文本块中首行文本的缩进*/
line-height: 2em: /* line-height 属性设置行间的距离(行高)*/
display: inline-block: /*相当于浮动 块级元素能够在同一行显示*/
background-image:url() :设置背景图片 记得添加高度(不然不显示图片)
background-repeat: no-repeat; 属性设置是否重复背景图像 不重复
background-position:定位背景图像
hover: 选择器用于选择鼠标指针浮动在上面的元素
display: block:让对象成为块级元素(块级元素可以显示,行元素不能显示)
text-decoration: none:消除文本下划线
border-radius: 10px; 边框弧度
padding:设置宽高
浙公网安备 33010602011771号