css image replacement technique


/ Published in: CSS
Save to your folder(s)

Technique #8 in example page.


Copy this code and paste it in your HTML
  1. <h1 class="technique-eight">
  2. <span></span>CSS-Tricks
  3. </h1>
  4.  
  5. h1.technique-eight {
  6. width: 350px; height: 75px;
  7. position: relative; overflow:hidden;
  8. }
  9. h1.technique-eight span {
  10. background: url("images/header-image.jpg");
  11. position: absolute;
  12. width: 100%;
  13. height: 100%;
  14. }

URL: http://css-tricks.com/css-image-replacement/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.