1.选择器的权重问题:
标签选择器 0001 内选择器 0010
id选择器 0100 伪类选择器 0010
包含选择器 :权重之和 属性选择器 0010
伪元素选择器 0001 内联样式 1000
2.元素的类型;块元素,行内元素,行内块元素
块元素:默认独占一行,设置宽高,设置内外边距 div,h1--h6 ,li
行内元素:无法直接设置宽高,内外边距 a,span
行内块元素:可以直接设置宽高,不会独占一行
font-style:italic; | 是否斜体文本 |
font-size | 字体大小 |
font-family | 字体类型 |
font-weight | 字体粗细 |
text-indent:2em | 缩进 |
text-align: center | 水平居中 |
line-height | 行高 |
text-decoration:line-through | 删除线 |
text-decoration:none | 去除下划线 |
opacity | 透明度 |
list-style-type | 列表样式类型 |
list-style-image:url() | 图片样式 |
list-style-position: | 定位 |
background-repeat:no-repeapt | 背景不重复 |
background--attachment:fixed | 背景图的固定 |
background-size:cover | 强行铺满 |
display:none | 元素隐藏 |
visibility:hidder | 元素隐藏(空间保留) |
display:block | 将其他元素转换为块元素 |
dispaly:inline-block | 转换为行内块元素 |
border | 边框 |
border-style-solid | 边框实线 |
bord-radius | 边框幅度 |
bord-collapse:collapse | 边框合并 |
textarea{resize:none} | 文本域不变 |
cursor | 鼠标 |
z-index 1 | 优先显现 |
positon-fixed | 固定定位 |
position:sticky | 粘性定位 |