CSS2 樣式表 屬性 內容

2021-04-13 13:56:43 字數 2378 閱讀 7121

1、include-source

語法:include-source : url ( url )

取值:url ( url ) : 使用絕對或相對 url 位址指定插入文件。假如該文件不存在,當前物件的內容將被顯示

說明:這個屬性插入另乙個文件到當前文件,取代當前物件的內容。插入文件的樣式屬性從當前物件繼承。

對應的指令碼特性為 includesource 。

示例:div

2、quotes

語法:quotes : none | string

取值:none : 預設值。 content 屬性的 open-quote 和 close-quote 值將不會生成任何巢狀標記

string : 用引號括起的巢狀標記定義。兩個為一組。第乙個 string 定義前標記(例:"<"),第二個 string 定義後標記(例:">")。組之間用空格格開。巢狀標記的應用深度按定義順序內推

說明:設定或檢索物件內使用的巢狀標記。

對應的指令碼特性為 quotes 。

示例:blockquote[lang-=fr]

blockquote[lang-=en]

blockquote:before

blockquote:after

? q

? this is an emedded quote.

? 顯示結果如下:

? "this is an 'embedded' quote."

3、content

語法:content : attr(alt) | counter(name) | counter(name , list-style-type) | counters(name , string) | counters(name , string , list-style-type) | no-close-quote | no-open-quote | close-quote | open-quote | string | url(url)

取值:attr(alt) : 使用物件的 alt 屬性的文字

counter(name) : 使用已命名的計數器

counter(name, list-style-type) : 使用已命名的計數器並遵從指定的 list-style-type 屬性

counters(name, string) : 使用所有已命名的計數器

counters(name, string, list-style-type) : 使用所有已命名的計數器並遵從指定的 list-style-type 屬性

no-close-quote : 並不插入 quotes 屬性的後標記。但增加其巢狀級別

no-open-quote : 並不插入 quotes 屬性的前標記。但減少其巢狀級別

close-quote : 插入 quotes 屬性的後標記

open-quote : 插入 quotes 屬性的前標記

string : 使用用引號括起的字串

url(url) : 使用指定的絕對或相對 url 位址

說明:用來和 :after 及 :before 偽元素一起使用,在物件前或後顯示內容。

對應的指令碼特性為 content 。

示例:p:after

p:before

4、counter-increment

語法:counter-increment : none | identifier number

取值:none : 預設值。阻止計數器增加

identifier number : identifier 定義乙個將被增加計數的選擇符(selector),id,或者class。 number 定義增加的數值。可以為負值。預設值是 1

說明:設定當乙個選擇符(selector)發生時計數器增加的值。

對應的指令碼特性為 counterincrement

示例:p:before

5、counter-reset

語法:counter-reset : none | identifier number

取值:none : 預設值。阻止計數器復位

identifier number : identifier 定義乙個將被復位的選擇符(selector),id,或者class。 number 定義復位的數值。可以為負值。預設值是 0

說明:將指定選擇符(selector)的計數器復位。

對應的指令碼特性為 counterreset 。

示例:h1:before

CSS2 樣式表 屬性 內容

1 include source 語法 include source url url 取值 url url 使用絕對或相對 url 位址指定插入文件。假如該文件不存在,當前物件的內容將被顯示 說明 這個屬性插入另乙個文件到當前文件,取代當前物件的內容。插入文件的樣式屬性從當前物件繼承。對應的指令碼特...

CSS2樣式表 屬性 尺寸

1 height 語法 height auto length 取值 auto 預設值。無特殊定位,根據html定位規則分配 length 由浮點數字和單位識別符號組成的長度值 百分數。百分數是基於父物件的高度。不可為負數。請參閱 長度單位 說明 檢索或設定物件的高度。對於 img 物件來說,僅指定此...

CSS2 樣式表 屬性 列表

1 list style 語法 list style list style image list style position list style type 取值 該屬性是復合屬性。請參閱各引數對應的屬性。預設值為 disc outside none。說明 設定列表專案相關樣式。當 list st...