content版本:CSS2 兼容性:無 繼承性:無
語法:
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 地址 |
說明:
示例:
p:after { content: url("http:www.devguru.com"); text-decoration: none; }
p:before { content: url("beep.wav") }