码迷,mamicode.com
首页 > 其他好文 > 详细

京东首页闪光滑动效果小记(转载)

时间:2015-09-22 18:31:00      阅读:110      评论:0      收藏:0      [点我收藏+]

标签:

http://www.w3cfuns.com/blog-5473326-5409149.html

<html>
<head>
<style>
.overimg{
position: relative;
display: block;
overflow: hidden;
box-shadow: 0 0 10px #FFF;
width:180px;
}
.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="http://www.nowamagic.net/librarys/images/201402/2014_02_15_01.jpg"></a>
<i class="light"></i>
</p>
<a href="http://www.nowamagic.net/librarys/veda/detail/2600" target="_blank"> 最后附上原效果地址,原效果未加overflow:hidden和设置p的宽度,作者进行了一些小小的优化</a>
</body>
</html>

京东首页闪光滑动效果小记(转载)

标签:

原文地址:http://www.cnblogs.com/dingyufenglian/p/4829370.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!