<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><style>body { font-family:Verdana; font-size:14px; margin:0;}#indexx {margin:0 auto; width:900px;}#headx { height:100px; background:red; margin-bottom:3px;}#ok { height:30px; background:#09c; margin-top:3px;}#content{height:500px; margin-top:5px;}#left{float:left;width:200px;height:500px;background:#9ff;}#right{float:right;width:700px;height:500px;}#ri{height:200px;background:#eeee11;}#rx{height:300px;background:#FF69B4;}#foot{height:80px;background:red;}ul.inventory{ list-style-type: none;}li{float:left}</style></head><body><div id="indexx"><div id="headx"></div><div id ="ok"></div><div id="content"><div id="left"><ul class="inventory"><li>訪問量</li><li>留言</li><li >更新</li></ul></div><div id="right"><div id="ri"></div><div id="rx"></div></div></div><div id="foot"></div></div></body></html>代碼貼出了 我想讓字 橫向排列上有間距...
2 回答

GCT1015
TA貢獻1827條經驗 獲得超4個贊
可以使用 letter-spacing:*px; 來控制文字間距,*px是指間距像素
這個不僅可以用在li里,其它需要文字排版的地方都可以使用
舉個例子:
.list li {width:200px; text-align:center; height:22px; line-height:22px; letter-spacing:5px; overflow:hidden; clear:both;}
說明.list li {li寬度200px; 文字居中; li高度22px; 行高22px; 字間距5px; 超出部份隱藏; 清除;}
- 2 回答
- 0 關注
- 2548 瀏覽
添加回答
舉報
0/150
提交
取消