Learn HTML step-by-step from A to Z or improve your professional skills.  Home HTML and CSS Tutorials Create Rollover Image in CSS
Your Ad Here

Create Rollover Image in CSS


Create Rollover Image in CSS ( You can see the final result here )

I made two buttons for this tutorial, save it if you want to work with them.

image 1image 2

1. Open Notepad and type the next code:

<html>
<head>
<style type="text/css">
a.image {
display: block;
width: 300px;
height: 200px;
background-image: url(Home1.jpg);
background-repeat: no-repeat;
}
a.image:hover {
background-image: url(Home2.jpg);
}
</style>
</head>
<body>
<center>
<a class="image" href="http://www.piticstyle.com" mce_href="http://www.piticstyle.com" target="_blank"></a>
</center>
</body>
</html>

2. Click on File > Save as and save like HTML

image 3

image 4

3. Go in the location where you save your page and open it

image 5

Note: If your images don't appear the problem is in the location where you save it your page. The images and index.html will need to be together, same location or same folder. Thank you!



Author's URL: PiticStyle
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

HTML is Hyper Text Markup Language that is used to make hypermedia and hypertext documents for the Web. More HTML and CSS: Most Popular Materials | Fresh Materials | More HTML Tutorials at Markuptutorials.com

Add comments to "Create Rollover Image in CSS"

Only registered users can write comment

No comments yet...