样式属性
背景与前景
background-color 背景色
background-image:url 设置背景图片
background-attachment:fixed 背景固定 scroll 滚动背景
background-repeat: no-repeat 不平铺 repeat 平铺 repeat-x 横向平铺 reoeat-y 纵向平铺
background-position: center 背景图居中 (设置背景图片位置时 repeat 必须是 no-repeat 不平铺)
background-position: right top 背景图放到右上角
background-position: left 100px top 200px 离左边100像素 离上边200像素 (可以是负值)
字体
font-family:"宋体" 选择字体 (常用微软雅黑 宋体)
font-size:12px 选择字体大小 常用像素 12px 14px 18px 还可以用 em, 2.5em 表示 2.5倍字体大小
font-weight:bold bold 是加粗 normal 是正常
font-style:italic italic 倾斜 normal 是不倾斜
color: 字体颜色
text-decoration: underline 下划线 overling 上划线 line-through 删除横线 none 去掉下划线
text-align: center 水平居中对齐 left 左对齐 right 右对齐
vertical-align:middle 垂直居中对齐 top 顶部对齐 bottom 底部对齐(一般需要设置行高)
line-height: 24px 行高 设置像素
text-indent: 16px 首行缩进 (根据字体大小调节)
透明度
background:rgba(0,0,0,0.6) 括号里(红,绿,篮,透明度)