課程
/前端開發
/HTML/CSS
/CSS Sprite雪碧圖應用
最后一個底部邊框如何去掉?
2014-08-15
源自:CSS Sprite雪碧圖應用 3-2
正在回答
li:last-child{border-bottom:none;}
謝謝 實現了
<html> <head> <!--準備一個空白的HTML頁面,同時完成css reset樣式 --> <meat http-equiv="Content-type" content="text/html;charset=utf-8"/> <title>列表</title> <!--補充完整的樣式--> <style> *{padding:0;margin:0;} .box{width:150px; border:1px solid #ccc;margin:10px auto;} li{list-style:none;height:35px;line-height:35px;text-align:center;border-bottom:1px solid #ccc;margin:0 10px;} li h3{font-size:12px;font-family:"微軟雅黑";font-weight:normal;} </style> </head> <body> <!--添加列表的結構--> <div class="box"> <ul> <li><h3>服裝內衣</h3></li> <li><h3>鞋包服飾</h3></li> <li><h3>運動戶外</h3></li> <li><h3>珠寶手表</h3></li> <li><h3>手機數碼</h3></li> <li><h3>家電辦公</h3></li> <li><h3>護膚彩妝</h3></li> <li style="border-bottom:none"><h3>母嬰用品</h3></li> </ul> </div> </body> </html>
這樣單獨給li一個樣式也是可以的
試試這樣寫
舉報
必學的大型網站實用技術,讓你快速掌握CSS Sprite雪碧圖技術
1 回答
6 回答
3 回答
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2015-08-16
li:last-child{border-bottom:none;}
2015-06-06
謝謝 實現了
2014-08-15
這樣單獨給li一個樣式也是可以的
2014-08-15
試試這樣寫