【html/css】CSS中去掉li前面的圓點方法

來源:互聯網
上載者:User

 在CSS中經常會使用到li標籤,預設情況下使用li時,會在文字前面自動加上一個黑色的小圓點,有時候會覺得這個圓點多餘,所以要去掉。下面介紹幾種常用的方法。

    方法一:
<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>

轉載自http://www.htmer.com/article/287.htm

相關文章

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.