您的位置:首页 > Web前端 > CSS

CSS: CSS常用的文本样式属性

2016-08-26 11:37 519 查看
介绍:CSS常用的文本样式属性

  color: 颜色

  font-size: 字体大小

  font-style (normal、italic、oblique): 字体样式(正常、斜体)

  font-weight (normal 、bold、100-900): 字体的粗细

  line-height: 行高

  text-align: 对齐方式

  text-decoration (underline、line-through):下划线(文字底部的线、穿过文字的线)

  word-spacing:字体之间的间隔

测试:

CSS_Property.html

h2{
color: #FF0000; /*color: red; */
font-size: 40px;
font-weight: bold;
font-style: italic;
text-align: center;
text-decoration: line-through;/*穿过文字*/
word-spacing: 40px;
}

p{
color: white;
font-size: 20px;
font-weight: 100;
font-style: oblique;
text-align: center;
line-height:40px;
text-decoration: underline;/*文字底部*/
background: rgb(13,195,176);
}


View Code



效果图:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: