1. css基本样式
① 背景语法
background: background-color || background-image || background-repeat || background-attachment || background-position
background:#000 url(图片地址) no-repeat fixed(scroll)5px center
background-image渐变背景:
html, body {
width: 100%;height: 100%;
}
body {
background-image: linear-gradient(top bottom, #7A88FF, #7AFFAF);
}
background-image:自适应高度
background:url("lizard.png") no-repeat 100% auto center scroll;
② 文本属性
① 内容对齐方式:
text-align: left | center | right
② 下划线:
text-decoration: underline | overline | line-through
③ 大小写转换:
text-transform: capitalize | uppercase | lowercase
④ 文本缩进 、 字母间距
text-indent: 2em | h1 { letter-spacing:2px; }
⑤ 自动换行:
word-wrap:break-word | normal
⑥ 垂直对齐方式:
vertical-align:top | middle | bottom
⑦ 行高:
li