How do you scale an image added to: before or: after in CSS?
For example, I have a page that contains a book cover:
<span class="book"> <img src="http://ecx.images-amazon.com/images/I/41t7xMPK%2B6L.jpg" /> </span>
I want to use CSS to make it look more like a book, not just a cover. I can use: before, to add a second image to do this, but since all the books vary in size, I need to be able to scale this image to fit the cover of the book.
I tried
.book:before{ content:url("/images/book.png"); position:absolute; height:100%; width:100%; }
but this does not work when scaling an image.
css
lucas
source share