![图片[1] - 博客网站右上角添加悬挂年兽 喜增龙年喜气源码 - 项目资源网](/wp-content/uploads/replace/6a87db7d7bd98c7896d49c269d0f55b2.webp)
主题设置>>自定义代码>>自定义css,填写如下代码
@media screen and (min-width: 850px){ .NewYear { width: 260px; height: 300px; display: inline-block; background: url(图片地址) no-repeat 50%/100%; vertical-align: middle; position: fixed; left: 85.8%; 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>
CSS代码放到自定义css文件里面,html放到你的自定义头部html即可!!
注意:如果你的是全屏网站建议在pointer-events: none;下面加一行
即css代码16行左右哪里加
z-index: 999;
要不然会被文章的上浮遮挡!!
© 版权声明
资源使用与合规声明
本站部分资源整理自互联网,仅供个人学习、研究或欣赏使用。我们高度重视知识产权保护,若无意中侵犯了您的权益,请通过下方联系方式告知,我们将第一时间核实并处理。
THE END








暂无评论内容