网站左上角logo图片扫光动态css代码分享源码
网站左上角logo图片扫光动态css代码分享源码
左上角logo有扫光,有的朋友可能以为是gif动态图片,其实是用css代码弄的, 以下是代码分享,需要的朋友自取
- /*扫光开始*/
- .header-logo {position:relative;float:left;margin-right:10px;padding:5px 0;overflow: hidden;}
- .header-logo a:before{
- content:"";
- position: absolute;
- left: -665px;
- top: -460px;
- width: 200px;
- height: 15px;
- background-color: rgba(255,255,255,.5);
- -webkit-transform: rotate(-45deg);
- -moz-transform: rotate(-45deg);
- -ms-transform: rotate(-45deg);
- -o-transform: rotate(-45deg);
- transform: rotate(-45deg);/*角度倾斜45*/
- -webkit-animation: searchLights 1s ease-in 1s infinite;
- -o-animation: searchLights 1s ease-in 1s infinite;
- animation: searchLights 2s ease-in 2s infinite;/*光扫过去的时间,自己修改,可以加快*/}
- @-webkit-keyframes searchLights {
- 0% { left: -100px; top: 0; }
- to { left: 120px; top: 100px; }
- }
- @-o-keyframes searchLights {
- 0% { left: -100px; top: 0; }
- to { left: 120px; top: 100px; }
- }
- @-moz-keyframes searchLights {
- 0% { left: -100px; top: 0; }
- to { left: 120px; top: 100px; }
- }
- @keyframes searchLights {
- 0% { left: -100px; top: 0; }
- to { left: 120px; top: 100px; }
- }
- /*扫光结束*/
文章版权声明:本站部分内容系网络转载,如果文章触发到您的利益或版权,请联系本站客服邮箱kefu@fz331.com删除,我们将48小时之内删除。
发表评论