给博客悬挂一个新年吉祥物,我这里选择的是年兽,感觉还蛮喜庆,当然也可以更改成灯笼、吉祥物等等,更改方式也很简单,直接替换图片即可,要求是透明底色的
教程开始
子比主题设置>>自定义代码>>自定义css,填写如下代码
@media screen and (min-width: 850px){
.NewYear {
width: 150px;
height: 200px;
display: inline-block;
background: url(https://8l2-1313360510.cos.ap-chongqing.myqcloud.com//wp-content/uploads/2024/10/20241008170228406.png) no-repeat 50%/100%;
vertical-align: middle;
position: fixed;
left: 90%;
top: 55px;
z-index: 50;
cursor: pointer;
animation: new-year 1.2s ease-in-out 0s infinite alternate;
margin-left: -1px;
transform-origin: 50% 0;
pointer-events: none;
}
}
@keyframes new-year{
0% {
transform: rotate(10deg);
}
100%{
transform: rotate(-10deg);
}
}
自己将里面的图片本地化一下!!
自定义头部HTML代码添加如下内容
<div class="NewYear"></div>
© 版权声明
THE END
暂无评论内容