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?
nothing wrong code. first image being redirected main website don't have image being loaded. have host locally. used different image , works.
Comments
Post a Comment