Friday 28 March 2014

How To Make a Picture Expand on Hover?

You won't get the codes for making a picture expand on hover.
But, here I am giving you.

Here, we'll have to make to files Main.html and Main.css.

So let's start.


Main.html will look like this.



<html>
<head><title>Main</title>
<link rel="stylesheet" type="text/css" href="Main.css">
</head>
<body>
<div id="picture">
<img src="http://findicons.com/files/icons/1072/face_avatars/300/i04.png">
</div>
</body>
</html>



This code will look like this









Now time for Main.css



#picture {
width:200px;
height:200px;
}

#picture:hover {

width:225px;
height:225px;
}



Now whenever you'll hover your cursor on the picture it will expand.

Follow Me On My Facebook Account.

No comments:

Post a Comment