码迷,mamicode.com
首页 > Web开发 > 详细

css3划过图片闪光

时间:2016-10-27 19:08:35      阅读:258      评论:0      收藏:0      [点我收藏+]

标签:hid   ati   for   abs   stop   ring   highlight   height   webkit   

css代码

01 .img { display:blockpositionrelativewidth:800pxheight:450pxmargin:0 auto;}
02 .img:before { content""positionabsolutewidth:200pxheight100%top0left:-150pxoverflowhidden;
03 background: -moz-linear-gradient(left, rgba(255,255,255,0)0, rgba(255,255,255,.2)50%, rgba(255,255,255,0)100%);
04 background: -webkit-gradient(linear, left topright top, color-stop(0%, rgba(255,255,255,0)), color-stop(50%, rgba(255,255,255,.2)), color-stop(100%, rgba(255,255,255,0)));
05 background: -webkit-linear-gradient(left, rgba(255,255,255,0)0, rgba(255,255,255,.2)50%, rgba(255,255,255,0)100%);
06 background: -o-linear-gradient(left, rgba(255,255,255,0)0, rgba(255,255,255,.2)50%, rgba(255,255,255,0)100%);
07 -webkit-transform: skewX(-25deg);
08 -moz-transform: skewX(-25deg)
09 }
10 .img:hover:before { left150%; transition: left 1s ease 0s; }

html代码

01 <a href="#" class="img"><img src="http://img.loveqiao.com/pic1.jpg" width="800"></a>
 

css3划过图片闪光

标签:hid   ati   for   abs   stop   ring   highlight   height   webkit   

原文地址:http://www.cnblogs.com/xfdmb/p/6004742.html

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