Monday, August 19, 2013

CSS pseudo element after

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
h1:after {content:url(bird_02.jpg)}
</style>
</head>

<body>
<h1>This is a heading</h1>
<p>The :before pseudo-element inserts content before an element.</p>
<h1>This is a heading</h1>
<p><b>Note:</b> Internet Explorer 8 (and higher) supports the content property
if a !DOCTYPE is specified.</p>
</body>
</html>

Result

No comments: