css去掉li前面的圓點

來源:互聯網
上載者:User

這是一個使用li的例子
<ul>
     <li>百度</li>
     <li>雅虎</li>
     <li>新浪</li>
     <li>Google</li>
</ul>
運行這段html代碼,會發現在前面有一個黑色的圓點,有時候會覺得這個圓點多餘,所以要去掉。去掉的使用方法是:
<ul>
     <li style="list-style-type:none;">百度</li>
     <li style="list-style-type:none;">雅虎</li>
     <li style="list-style-type:none;">新浪</li>
     <li style="list-style-type:none;">Google</li>
</ul>
還可以也成這樣
<style>
 li {list-style-type:none;}
</style>
<ul>
     <li>百度</li>
     <li>雅虎</li>
     <li>新浪</li>
     <li>Google</li>
</ul>
也可以寫成
<style>
 .li_style {list-style-type:none;}
</style>
<ul>
     <li class="li_style">百度</li>
     <li class="li_style">雅虎</li>
     <li class="li_style">新浪</li>
     <li class="li_style">Google</li>
</ul>

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.