<!DOCTYPE html><html>? ? <head>? ? ? ? <meta charset="utf-8">? ? </head>? ? <style>? ? /*清零*/? ? ? ? *{margin:0; padding:0;}? ? ? ? li{list-style:none;}? ? ? ? img{border:none;}? ? ? ? a{text-decoration:none;}? ? ? ? input,textarea,select{outline:none;}? ? ? ? textarea{resize:none;}? ? ? ? input{border:none;}? ? ? ? .clearfix:after{content:''; clear:both; display:block; height:0; overflow:hidden;}? ? ? ? .clearfix{zoom:1;}? ? /*整體*/? ? .box {width: 268px;height: 396px;margin: 100px auto;background: #dee7e7;}? ? /*頭部*/? ? .nav span {width: 148px;height: 37px;border-bottom: 1px solid #94bdd6;margin-left: 8px;padding-left:14px; background: #dee7e7;font-size: 18px;font-weight: bold;line-height: 37px;text-align: left;color: #183952;display: block;float: left;}? ? .nan li {float: right;width: 38px;height: 27px;line-height: 27px;padding-top: 10px;}? ? </style>? ? <body>? ? <div id="box">? ? ? ? <div id="nav">? ? ? ? ? ? <span>觀看排行榜</span>? ? ? ? ? ? <ul>? ? ? ? ? ? ? ? <li>每日</li>? ? ? ? ? ? ? ? <li>每周</li>? ? ? ? ? ? ? ? <li>全部</li>? ? ? ? ? ? </ul>? ? ? ? </div>? ? ? ? <div id="text">? ? ? ? <dl>? ? ? ? ? ? <dt><span>1</span><p>關于地球與人類的一千零一問</p></dt>? ? ? ? ? ? <dd><span>1</span><img src="" alt="" /><span></span></dd>? ? ? ? </dl>? ? ? ? </div>? ? ? ? <a href="">更多》</a>? ? </div>? ? </body></html>
2 回答
已采納

qq_青棗工作室_0
TA貢獻446條經驗 獲得超754個贊
?.nan li {float: right;width: 38px;height: 27px;line-height: 27px;padding-top: 10px;}
你打錯字了,是 .nav li,不是 .nan li

yumanutong
TA貢獻6條經驗 獲得超12個贊
?#nav ul li {float: left;width: 38px;height: 27px;line-height: 27px;padding-top: 10px;}
一,上面是id ,所以用 # 而不是 點,用點的,是class。二,mav,你兩個都不一樣。三。用left??孔笈帕胁艑Π?。
- 2 回答
- 0 關注
- 1637 瀏覽
相關問題推薦
添加回答
舉報
0/150
提交
取消