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

前端笔记 CSS 2

2016-04-18 22:27 417 查看

文本

文本设置文本颜色 点击打开链接

<style type="text/css">

body{colr:red}

h1{color:#00ff00}

p.ex{color:rgb(0,0255)}

</style>

字符间距 点击打开链接

<span style="font-size:18px;">h1 {letter-spacing: -0.5em}
h4 {letter-spacing: 20px}</span>

设置行间距  点击打开链接

p.small {line-height: 90%}
<pre name="code" class="html">p.small {line-height: 10px}


<pre name="code" class="html">p.small {line-height: 0.5}



对齐文本 点击打开链接

h1 {text-align: center}

修饰文本 点击打开链接

h1 {text-decoration: overline}
h2 {text-decoration: line-through}
h3 {text-decoration: underline}
h4 {text-decoration:blink}
a {text-decoration: none}

缩进文本 点击打开链接

p {text-indent: 1cm}

控制文本中的字母 点击打开链接

p.uppercase {text-transform: uppercase}
p.lowercase {text-transform: lowercase}
p.capitalize {text-transform: capitalize}
禁止文本折行 点击打开链接

white-space: nowrap

增加单词间距 点击打开链接
p.spread {word-spacing: 30px;}
p.tight {word-spacing: -0.5em;}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: