

字体
body{font-family:"宋体";}颜色
body{color:#666}大小
body{font-size:12px;}
body{font-size:1em;}缩进
p {text-indent: 2em;}
p {text-indent: 50%;} //基于父元素字体风格
p.normal {font-style:normal;}//默认
p.italic {font-style:italic;}// 斜体
p.oblique {font-style:oblique;}// 倾斜对其方式
h1{text-align:center;}值:left、right、center、justify
字间距
p{word-spacing:25px;}
p{word-spacing:normal;}// 相当与0px字母间距
h1 {letter-spacing:2px;}
h1 {letter-spacing:normal;}字符转换
h1 {text-transform: none;}//默认
h1 {text-transform: capitalize;}//首字母大写
h1 {text-transform: uppercase;}// 全部大写
h1 {text-transform: lowercase;}// 全部小写文本修饰
a {text-decoration: none;}
h1 {text-decoration:overline}//上划线
h2 {text-decoration:line-through}//中划线
h3 {text-decoration:underline}// 下划线
// blink闪烁文本,不过兼容性不好,很多浏览器都不支持粗体
p.normal {font-weight:normal;}
p.thick {font-weight:bold;}//粗体
p.bolder{font-weight:bolder;}// 更粗
p.lighter{font-weight:lighter;}// 更细
p.thicker {font-weight:900;}//400 等同于 normal,而 700 等同于 bold。以上是目前常用的一些CSS文字样式,希望能够给大家一些帮助。
相关文章:
必须掌握的CSS文字样式
实现css文字飞入效果示例代码
