首页 > 其他 > 详细

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

时间:2015-09-22 18:30:08      阅读:233      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!