text-align(对齐)的选项:
center(居中), left, right, justify(左右对齐)
line-height(行高)可以用来竖直居中
letter-spaceing 字间距 单位同行高
text-indent(缩进) 单位em
text-decoration 选项很多自己搜
text-shadow(文字阴影): 举例 text-shadow: 5px -5px 2px color
CSS:
子元素的margin-top连带影响父元素的上外边距 解决方法:
① 父元素加一个边框:border: 1px solid;
② 父元素加内边距:padding-top: 1px;
③ 父元素加上overflow属性 overflow: hidden;
④ 在父元素前面加一个空内容:.div-outer::before {content: “”;display: table;}
上下会重叠,左右不会重叠、叠加