前端笔记 CSS 2

文本

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

<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;}




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值