.class {
position: relative;
}
.class:before {
content:'';
position: absolute;
top: 0px;
left: 0px;
width: 20px;
height: 20px;
background : gold url(../images/sprite.png) no-repeat 0 -50px;
}
.class:after {
content:'';
position: absolute;
top: 0px;
left: 0px;
width: 20px;
height: 20px;
background : gold url(../images/sprite.png) no-repeat 0 -100px;
}
Handy trick for putting pseudo-element after an elemet.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.