after property CSS Reference



Definition and Usage

The CSS :after pseudo-element matches a virtual last child of the selected element. Typically used to add cosmetic content to an element, by using the content CSS property. This element is inline by default.


Syntax

element:after  { style properties }  /* CSS2 syntax */
element::after { style properties }  /* CSS3 syntax */
The ::after notation was introduced in CSS 3 in order to establish a discrimination between pseudo-classes and pseudo-elements. Browsers also accept the notation :after introduced in CSS 2.

Examples

No examples

Compatibility

Desktop browsers

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
:after support(Yes)1.0 (1.7 or earlier)8.044.0
::after support(Yes)1.59.074.0
Support of animations and transitions264.0 (2.0)Not supportedNot supportedNot supported

Mobile browsers

FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
:after supportNANANANANA
::after supportNANANANANA
Support of animations and transitions264.0 (4.0)Not supportedNot supportedNot supported

Relative articles