Image sprites CSS - Tryit Editor for Web Developers
Edit This Code:
See Result »
<html> <head> <style> #navlist { position: relative; } #navlist li { margin: 0; padding: 0; list-style: none; position: absolute; top: 0; } #navlist li, #navlist a { height: 200px; display: block; } #home { left: 0px; width: 300px; background: url('logo.jpg') 0 0; } #home a:hover { background: url('logo.jpg') 0 -45px; } </style> </head> <body> <ul id="navlist"> <li id="home"><a href="https://t4tutorials.com/"></a></li> </ul> </body> </html>
Result: