7.美化网页元素
1.span标签:重点要突出的字,使用span套起来
2.字体样式
- 字体:font-family:楷体;
- 字体颜色:color: green;(单词 / RGB / RGBA透明度0-1)
- 字体大小:font-size: 42px;
- 字体粗细:font-weight: bold;
3.文本样式
- 文本对齐方式:text-align: center;
- 段落首行缩进:text-indent: 2em;
- 行高:height:150px;
- 块的高度:line-height:150px 注意:行高和块的高度一致,就可以单行文字上下居中(line-height=height)
- 上划线:text-decoration: overline;
- 中划线:text-decoration: line-through;
- 下划线:text-decoration: underline;
- 去掉下划线:text-decoration: none;
- 文本水平对齐:vertical-align:middle;
4.超链接伪类
-
鼠标悬浮状态 a:hover{ }
- 鼠标按住未释放状态 a:active{ }
- 已访问的连接 a:visited{ }
5.阴影:text-shadow:阴影颜色,水平偏移,垂直偏移,阴影半径
6.列表
- list-syle:none 去掉圆点
- list-style:circle 空心圆
- list-style:decimal 数字
- list-style:square 正方形
浙公网安备 33010602011771号