In Baidu music http://music.baidu.com/see such a picture effect, when the mouse moved up, there will be a flash in the picture across, the effect is very cool. So the effect can be realized again:
The general idea is that the design of a transparent layer of i,skewx on the x-axis of the negative 25 degrees of deformation, the background color with the CSS3 linear gradient linear-gradient, and then hover, set 0.5s animation time.
At the same time in the I layer using cursor:pointer, if not set this, need to wait for transparent layer animation before you can see the pointer pointer.
Open FireBUG debugging to see more clearly!
The
code is as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv= "Content-type" content= "text/html"; Charset=utf-8 "/>
<title> Flash Pictures </title>
<style>
. overimg{
position:relative;
Display:block;
/* Overflow:hidden; */
box-shadow:0 0 10px #FFF;
}
. light{
Cursor:pointer;
Position:absolute;
left: -180px;
top:0;
width:180px;
height:90px;
background-image:-moz-linear-gradient (0deg,rgba (255,255,255,0), Rgba (255,255,255,0.5), Rgba (255,255,255,0));
background-image:-webkit-linear-gradient (0deg,rgba (255,255,255,0), Rgba (255,255,255,0.5), Rgba (255,255,255,0 ));
transform:skewx ( -25DEG);
-o-transform:skewx ( -25DEG);
-moz-transform:skewx ( -25DEG);
-webkit-transform:skewx ( -25DEG);
}
. Overimg:hover. light{
left:180px;
-moz-transition:0.5s;
-o-transition:0.5s;
-webkit-transition:0.5s;
transition:0.5s;
}
</style>
</head>
<body>
<p class= "overimg" >
<a><img src= "2014_02_15_01.jpg" ></a>
<i class= "Light" ></i>
</p>
</body>
</html>