网站LOGO扫光特效的实现方法

最近好多网站logo都有一些动态的效果,各种方法可以实现,比如把logo做成gif格式来实现动画等,这里鸿硕科技说的是另外一种方法,纯css代码方式来实现,实现出扫光特效,光束线角度和大小均可调整。先看一下实现的效果,如下图:

代码如下:
/**logo扫光效果CSS**/
.logo{
/*border: solid 2px red;*/
position: relative;
overflow: hidden;
}
.logo:before{ /**根据logo外div样式名称修改before前名称**/
content:"";
position: absolute;
left: -665px;
top: -460px;
width: 50px;
height: 10px; /**光标的宽度,可根据实际调整**/
background-color: rgba(255,255,255,.5);
-webkit-transform: rotate(-75deg);
-moz-transform: rotate(-75deg);
-ms-transform: rotate(-75deg);
-o-transform: rotate(-75deg);
transform: rotate(-75deg);
-webkit-animation: searchLights 1s ease-in 1s infinite;
-o-animation: searchLights 1s ease-in 1s infinite;
animation: searchLights 1s ease-in 1s infinite;/**第一个数字参数控制扫光速度,数字越大越慢**/
}
@-webkit-keyframes searchLights {
0% { left: -100px; top: 0; }
to { left: 100px; top: 30px; }
}
@-o-keyframes searchLights {
0% { left: -100px; top: 0; }
to { left: 100px; top: 30px; }
}
@-moz-keyframes searchLights {
0% { left: -100px; top: 0; }
to { left: 100px; top: 30px; }
}
@keyframes searchLights {
0% { left: -100px; top: 0; }
to { left: 100px; top: 30px; }
}

给TA打赏
共{{data.count}}人
人已打赏
行业动态

批量替换WordPress文章中图片URL地址的方法

2021-1-2 15:15:31

行业动态

nginx环境的本地站点上传到apache环境的服务器中的注意事项

2021-1-22 20:05:16

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索