The CSS content property automatically generates content to attach before/after a CSS selector (using the :before and :after pseudo-elements). One or more keywords may be specified for this property, but the content does not actually exist in the document tree; it is generated "on-the-fly." The display property is used with this property to specify the type of rendering box for the generated content.
Values[]
| Value | Description |
|---|---|
inherit |
Explicitly sets the value of this property to that of the parent. |
normal |
For pseudo-elements, no content will be generated. |
<string> |
The content of this value will be used as the generated text. |
| URL | An absolute or relative URL pointing to an embeddable object. If rendering of the file is not possible by the browser, it should be ignored. |
<counter()><counter()> |
counter(name) counter(name, list-style-type)
|
open-quote, close-quote |
A quote of the indicated type is inserted as appropriate, taking its value from the quotes property.
|
no-open-quote, no-close-quote |
A quote is not inserted for the open/close quote, but the quote nesting level is still incremented/decremented accordingly. |
<attr(X)> |
This syntax returns a string which is the unparsed value of the indicated element attribute (X) for the current CSS selector. If the specified attribute does not exist, an empty string should be returned. Case sensitivity of the attribute name should depend on the language in use (eg: XML is case sensitive while HTML is not). If the system supports it, you can also supply a namespace prefix to narrow down the attribute selection as well, eg: attr(foo|align) where "foo" is the namespace prefix, and "align" is the attribute being selected in that namespace only.
|
CSS example:
em:before {
content:url("ding.wav");
}
