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