CSS content Property
Complete CSS Reference
Definition
The content property is used with the :before and :after pseudo-elements to
generate content to attach before or after a
CSS selector.
Inherited: No
JavaScript Syntax
CSS properties can also be dynamically changed with a JavaScript.
Scripting Syntax: object.style.content="url(beep.wav)"
In our HTML DOM tutorial you can also find a full
Style Object Reference.
Example
p:before
{
content: url("beep.wav")
}
img:before
{
content: attr(alt)
}
|
Possible Values
Value |
Description |
string |
Defines text content. Default value is "" |
url |
Defines a 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 |
|
Complete CSS Reference
Learn XML with <oXygen/> XML Editor - Free Trial!
|
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|