change image when hover over, using CSS -


<!doctype html> <html> <head> <style>  .main {     background-image: url('a.jpg'); }  .main:hover {     background-image: url('b.jpg'); } </style>  </head>  <body>     <div class="main">     </div> </body> </html> 

when load page, a.jpg didnt appear @ all, hence no hover effect

is wrong code?

http://jsfiddle.net/zh9el/6/

nothing wrong code. first image being redirected main website don't have image being loaded. have host locally. used different image , works.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -