当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS content属性
The content property is used with the :before and :after pseudo-elements to generate content to attach before or after a CSS selector.
content属性可通过:before 和 :after 这两个伪元素来给CSS选择器的前后生成附带内容。
Inherited: No
继承性:无
p:before { content: url("beep.wav") } img:before |
值 | 描述 | NN | IE |
---|---|---|---|
string | Defines text content 定义文字内容 | ||
url | Defines a url 定义url资源 | ||
counter(name) counter(name, list-style-type) counters(name, string) counters(name, string, list-style-type) | |||
attr(X) | Defines an attribute of a selector to be displayed before/after the selector 定义选择器前后的属性 | ||
open-quote | |||
close-quote | |||
no-open-quote | |||
no-close-quote |