為什麼list-style-type:none;沒有起作用?

來源:互聯網
上載者:User
我學習別人的寫法,直接寫在CSS的最前面,可在FireFox下不起作用。IE倒是不用也不會出現圓點~

<ul id="navlist">  <li>首頁</li>  <li>簡介</li></ul>

Css
樣式一

ul{list-style-type:none;}#navlist li{float:left;padding:55px 13px 0 0;}

樣式二

#navlist li{float:left;padding:55px 13px 0 0;list-style-type:none;}

“樣式一”在FF下還是會出現列表圓點。“樣式二”就不會出現~鬱悶。為什麼別人就行呀~~~~~

這樣試試:

ul#navlist{list-style-type:none;}
<html><head></head><style type="text/css">ul{list-style-type:none;}#navlist li{float:left;padding:55px 13px 0 0;} </style><body><ul id="navlist">  <li>首頁 </li>  <li>簡介 </li></ul></body></html>

我的FF沒有圓點

FF,IE6,IE7,IE8正常

<!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><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>無標題文檔</title><style type="text/css">#uTest{list-style:none;}</style></head> <body><div><ul id="uTest"><li>l1</li><li>l2</li><li>l3</li></ul></div></body></html>
相關文章

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.