文章最后更新时间:2025-01-09 22:37:00
给博客悬挂一个新年吉祥物,我这里选择的是年兽,感觉还蛮喜庆,当然也可以更改成灯笼、吉祥物等等,更改方式也很简单,直接替换图片即可,要求是透明底色的
教程开始
子比主题设置>>自定义代码>>自定义css,填写如下代码
本文隐藏内容 – 登录可见
@media screen and (min-width: 850px){
.NewYear {
width: 150px;
height: 200px;
display: inline-block;
background: url(https://tuchuang.org.cn/imgs/2025/01/09/04fa6dc5625186da.png) no-repeat 50%/100%;
vertical-align: middle;
position: fixed;
left: 80%;
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>
图片素材
暂无评论内容