css-font
font-size | 设置字号大小 |
---|---|
font-family | 字体 |
font-weight | 字体粗细 |
font-style | 字体风格 |
css背景
background-attachment | 背景图像是否固定或者随页面滚动 |
---|---|
background-color | 设置元素的背景颜色 |
background-image | 设置背景图片 |
background-repeat | 设置图片是否及如何重复 |
background-size | 规定背景图片的尺寸 |
background-origin | 规定背景图片的定位区域 |
background-clip | 规定背景的绘制区域 |
css文本
color | 文本颜色 |
---|---|
direction | 文本方向 |
line-height | 行高 |
letter-spacing | 字符间距 |
text-align | 对齐元素中的文本 |
text-decorate | 向文本添加修饰 |
text-index | 缩进元素中文本的首行 |
text-transform | 元素中的字母 |
Unicode-bidi | 设置文本方向 |
white-space | 元素中空的处理方式 |
word-spacing | 字间距 |
css链接的四种状态、
a:link | 普通的,未被访问的链接 |
---|---|
a:visited | 用户已访问的链接 |
a:hover | 鼠标指针位于链接上方 |
a:active | 链接被点击的时刻 |
text-decoration | 用于去点链接下方的下划线 |
css列表
list-style | 简写列表项 |
---|---|
lis-style-image | 列表项图像 |
list-style-position | 列表标志位置 |
list-style-type | 列表类型 |
css表格
border-collapse:collapse | 折叠边框 |
---|---|
border:1 px solid color | 颜色 设置宽度和颜色 |
css轮廓
outline | 设置轮廓属性 |
---|---|
outline-color | 设置轮廓颜色 |
outline-style | 设置轮廓的样式 |
outline-width | 设置轮廓的宽度 |
css内边距
padding | 设置所有边距 |
---|---|
padding-bottom | 设置底边距 |
padding-left | 设置左边距 |
padding-right | 设置右边距 |
padding-top | 设置上边距 |
css边框
border | 定义了10个不同的继承样式,包括none,同时可以设置单边样式 |
---|---|
border-radius | 圆角边框 |
box-shadow | 边框阴影 |
border-image | 边框图片 |
css定位
position:把元素放在一个静态的,相对的,绝对的,或固定的位置中(static,relative,absolute,fixed, top,left,right,button,元素向各方向的偏移量)
overflow:设置元素溢出其区域发生的事情
clip:设置元素的形状
vertical-align:设置元素的垂直对齐方式
z-index:设置元素的堆叠方式,谁的数字大,谁就在前面
css浮动
float可用值:
left:向左浮动
right:向右浮动
none:元素不浮动
inherit:从父级继承浮动属性
clear:
left,right:清除元素向左向右浮动
both:左右两侧均去掉浮动
inherit:从父级继承来clear的值