We would like to know how to hover to fly image in.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.test {<!--from w ww .j ava 2s.com-->
width: 278px;
margin: 20px;
text-align: center;
}
.imageContent {
width: 278px;
height: 231px;
margin: 30px auto;
position: relative;
border: 4px solid #999;
}
.activa_hover {
width: 100%;
height: 100%;
background-image:url(http://www.java2s.com/style/download.png);
position: absolute;
background-position: -265px 0;
left: 0px;
top: 0px;
background-repeat: no-repeat;
-webkit-transition: background-position .3s ease;
-moz-transition: background-position .3s ease;
-o-transition: background-position .3s ease;
transition: background-position .3s ease;
}
.activa_hover:hover {
background-position: 160px 0;
}
</style>
</head>
<body>
<div class="test">
<div class="imageContent">
<img
src="your image" />
<div class="activa_hover"></div>
</div>
<div>
</body>
</html>
The code above is rendered as follows: