CSS文法手冊(六)分類屬性

來源:互聯網
上載者:User
1、display

功能:改變元素的顯示值,可以將元素類型線上,塊和清單項目相互變換。
數值:
none - 不顯示元素
block - 塊顯示,在元素前後設定分行符
inline - 刪除元素前後的分行符,使其併入其它元素流中
list-item - 將元素設定為清單中的一行
說明:可用 display 屬性值產生插入標題和補加清單或讓圖形變成線上顯示。

2、white-space

功能:控制元素內的空白。
數值:
normal - 不改變,保持預設值,在瀏覽器頁面長度處換行。
PRe - 要求文檔顯示中採用原始碼中的格式。
nowarp - 不讓訪問者在元素內換行。

3、list-style-type

功能:指定清單所用的強調符或編號類型
數值:
none - 無強調符
disc - 碟形強調符(實心圓)
circle - 圓形強調符(空心圓)
square - 方形強調符(實心)
decimal - 十進位數強調符
lower-roman - 小寫羅馬字強調符
upper-roman - 大寫羅馬字強調符
lower-alpha - 小寫字母強調符
upper-alpha - 大寫字母強調符
例子:

item1

item2

item3

4、list-style-image

功能:用於將清單中標準強調符換成所選的圖形
數值:
無圖形
url - 圖形URL地址
例子:

item1

item2

item3

5、list-style-position

功能:用於設定強調符的縮排或伸排,這個屬性可以讓強調符突出於清單以外或與清單項目對齊。
數值:
inside - 縮排,將強調符與清單項目內容左邊界對齊
outside - 伸排,強調符突出到清單項目內容左邊界以外

6、list-style

功能:簡寫屬性,將所有清單屬性放在一條語句中。
數值:
list-style-type
list-style-position
list-style-image
這些值的細節見各個屬性部分。
例子:

item1

item2

item3

以上就是CSS文法手冊(六)分類屬性的內容,更多相關內容請關注topic.alibabacloud.com(www.php.cn)!

  • 相關文章

    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.