CSS常用属性
尺寸与颜色
边框、圆角和阴影
- border-width
- border-style
solid - border-color
- border-radius 数值或百分比;指定为
50%时整体为圆。 - box-shadow
- opacity 透明度
背景
- background-color
- background-image
- background-repeat
- background-position
- background-attachment
- background-clip 背景图像的绘制区域
- background-origin 背景图像的位置
- background-size
文本
- font-size 可使用绝对数值
px,相对数值 em % 等。 - font-family
sans-serif monospace 多个字体之间使用逗号隔开,带有空格的字体名称使用引号包围。注意 font-family 的查找是逐字的。 - font-weight
bold tag: <strong> - text-transform
uppercase, lowercase, capitalize等。 - text-decoration
underline tag: <u> line-through tag: <s>(删除线) dotted 下加点
- text-align
justify, left, right, center - line-height 行高
渐变
- background-image:
linear-gradient(to bottom, #FFFFFF, #00FF00)