IMG-Element bekommt Hintergrundbild

Quasi ein Platzhalter für Bilder.

by Jens Grochtdreis

HTML

<img src=""/>

CSS

img { 
    width: 200px; 
    height: 250px; 
    background: url(http://placekitten.com/200/250);
}

/* styling basics */
html {padding: 20px 0; background-color: #efefef;}
body {width: 80%; padding: 40px; margin: 0 auto; background: #fff; box-shadow: 1px 1px 5px rgba(0,0,0,0.5); font-family: Verdana, Arial, sans-serif; font-size: 14px;}