Pro HTML5 and CSS3 Design Patterns

(avery) #1

CHAPTER 14 ■ IMAGES


Replaced Text


HTML


<h1>Replaced Text</h1>

<h2 id="h2">Heading 2<span></span></h2>

CSS


#h2 { position:relative; width:250px; height:76px;
padding:0; overflow:hidden; }

#h2 span { position:absolute; width:250px; height:76px;
left:0; top:0; margin:0;
background:url("heading2.jpg") no-repeat; }
Free download pdf