logo扫光特效,网站logo扫光特效纯代码,演示看本站logo,可调节速度
将以下代码加到你的网站css文件里面,随意,只要能引用的css就行了,wordpress用户加在style.css里面。
.site-title:before{/*这里第一句看原理解释*/content: "";
position: absolute;
width: 150px;
height: 10px;
background-color: rgba(255, 255, 255, 0.5);
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);/*角度倾斜45*/-webkit-animation: blink 1s ease-in 1s infinite;/*光扫过去的时间,自己修改,可以加快*/animation: blink 1s ease-in 1s infinite;/*光扫过去的时间,自己修改,可以加快*/
}
@-webkit-keyframes blink {
from {left: 10px;top: 0;}
to {left: 320px;top: 0;}
}
@-o-keyframes blink {
from {left: 10px;top: 0;}
to {left: 320px;top: 0;}
}
@-moz-keyframes blink {
from {left: 10px;top: 0;}
to {left: 320px;top: 0;}
}
@keyframes blink {
from {left: -100px;top: 0;}
to {left: 320px;top: 0;}
}
(必看)原理解释
给大家解释一下代码,不看可能不会扫(WordPress柒比贰主题可以忽略,因为博主也是。)
找到你的logo所处的div,然后找到他的class,如这个实例:
<h1 class="yuanli pos-a">< a src=https://www.miuiy.com/logo1.png alt="艺创博客"/>a h1>
看到yuanli那个class了吗?你的应该只是命名不一样,然后再css里面添加上面的css,然后第一句写法就应该用如下的
.yuanli:before{/*这里第一句看原理解释*/content: "";
完成以上操作就行啦。
I don’t think the title of your enticle matches the content lol. Just kidding, mainly because I had some doubts after reading the enticle. https://accounts.binance.com/en/register-person?ref=P9L9FQKY