view raw
Sazz Sazz - 8 months ago 30
CSS Question

Can the content:" "; have an image tag or say an image?

Okay so I have been doing researches but still couldn't figure out if 'content:" ";' can contain images by any chance.

I don't whether my question is even appropriate or not. But would be happy to know if it could contain image links. Thanks.

For example I have an image tag as:

<img src="kitten.jpg">

could i add this image in the content property

:after {
content:" ";


From, property values of content:

url(url) | Sets the content to be some kind of media (an image, a sound, a video, etc.)

So this will work:

.yourDiv:after { 
content: url('image-src'); 

Example snippet:

p:after {
  content: url('');
  <p>Some Stuff</p>