CSS:list-style-image的使用詳解

來源:互聯網
上載者:User
你對CSS list-style-image屬性的用法是否瞭解,這裡向大家描述一下,list-style-image屬性使用映像來其他清單項的標記,這個屬性指定作為一個有序或無序清單項目標誌的映像。

CSS list-style-image屬性列表表徵圖

定義和用法

list-style-image屬性使用映像來其他清單項的標記。

說明

這個屬性指定作為一個有序或無序清單項目標誌的映像。映像相對於清單項目內容的置放位置通常使用list-style-position屬性控制。

注釋:請始終規定一個"list-style-type"屬性以防映像不可用。

執行個體

把映像設定為列表中的項目標記:

ul  {  list-style-image:url("/i/arrow.gif");  list-style-type:square;  }

瀏覽器支援

所有瀏覽器都支援list-style-image屬性。

注釋:任何的版本的InternetExplorer(包括IE8)都不支援屬性值"inherit"。

可能的值

文法:

list-style-image : none | url (url)

參數:

none :  不指定映像
url :  使用絕對或相對位址指定背景映像

說明:

設定或檢索作為對象的清單項目標記的映像。
若list-style-image屬性為none或指定映像不可用時,list-style-type屬性將發生作用。
對應的指令碼特性為listStyleImage。請參閱我編寫的其他書目。

樣本:

ul.out { list-style-position: outside; list-style-image: url("images/ie.gif"); }
相關文章

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.