(Translated by https://www.hiragana.jp/)
:after Pseudo-class (A, ADDRESS, B, ...)
The Wayback Machine - https://web.archive.org/web/20080407233911/http://msdn2.microsoft.com:80/en-us/library/cc304076(VS.85).aspx
Click to Rate and Give Feedback
:after Pseudo-class
New for Windows Internet Explorer 8

Defines generated content that appears after an element.

Syntax

HTML:after { sRules }
ScriptingN/A

Possible Values

sRulesString that specifies one or more Cascading Style Sheets (CSS) attribute/value pairs.

Remarks

The :before and :after pseudo-elements specify the location of content before and after an element in the document tree. The content attribute, in conjunction with these pseudo-elements, specifies what is inserted.

The generated content interacts with other boxes as if they were real elements inserted just inside their associated element. The content box of the associated element expands to include the generated content, if necessary.

This pseudo-class requires that Internet Explorer be in IE8 mode rendering. For more information, see Defining Document Compatibility.

Example

The following style rules insert curly braces before and after each occurence of H1 in the document tree.

H1:before {
    content: "{ ";
}
H1:after {
    content: " }";
}  

Standards Information

This pseudo-class is defined in CSS, Level 2 Revision 1 (CSS2.1) World Wide Web link.

Applies To

A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CITE, CODE, DD, DFN, DIV, DL, DT, EM, hn, I, IMG, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=text, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, NOBR, OL, P, PLAINTEXT, PRE, S, SAMP, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL

See Also

content
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker