详情
评论
问答

子比主题-灵动岛样式美化代码

文章最后更新时间:2025-06-08 22:03:47

图片[1]--阿七|阿七源码|建站源码|小程序源码|模板|下载子比主题-灵动岛样式美化代码--阿七|阿七源码|建站源码|小程序源码|模板|下载阿七源码

WordPress论坛子比主题美化-zibll官网添加一个灵动岛样式美化代码

本次教程适合子比主题!其他主题自测

教程开始:

将下面代码添加到自定义css中:

.dynamic-island:hover img {width:30px;    height:30px;;}
.bars {display:flex;align-items:center;  justify-content:flex-end;  gap:3px;}
.bar {width:2px;height:13px;background-color:green;animation:bounce 1s infinite ease-in-out;animation-direction:alternate;}
.bar:nth-child(1) {animation-duration:1s;}
.bar:nth-child(2) {animation-duration:0.9s;}
.bar:nth-child(3) {animation-duration:0.8s;}
.bar:nth-child(4) {animation-duration:0.7s;}
.bar:nth-child(5) {animation-duration:0.6s;}
.bar:nth-child(6) {animation-duration:0.9s;}
.bar:nth-child(7) {animation-duration:0.7s;}
.dynamic-island {position:fixed;top:80px;left:50%;transform:translateX(-50%) scale(0);    transform-origin:center;width:auto;max-width:80%;height:40px;background-color:#000;border-radius:25px;    color:white;display:flex;align-items:center;justify-content:space-between;    transition:transform 0.4s ease-in-out,height 0.6s ease-in-out,border-radius 0.6s ease-in-out,box-shadow 0.5s ease-in-out,opacity 0.5s ease-in-out;overflow:visible;    z-index:1000;padding-left:35px;    padding-right:20px;    opacity:0;box-shadow:0 0px 10px rgba(0,0,0,0.45);;}
.dynamic-island.active {transform:translateX(-50%) scale(1);    opacity:1;}
.dynamic-island.inactive {transform:translateX(-50%) scale(0);    opacity:0;}
.island-content {opacity:0;transition:opacity 0.9s ease-in-out,filter 0.8s ease-in-out;    font-weight:bold;    flex-grow:1;    text-align:right;    width:100%;}
.dynamic-island.active .island-content {opacity:1;}
.dynamic-island img {position:absolute;left:10px;    width:20px;    height:20px;    object-fit:cover;    transition:height 0.8s ease-in-out,width 0.8s ease-in-out,filter 0.8s ease-in-out;}
.dynamic-island:hover {height:60px;border-radius:50px;}
@keyframes bounce {0% {transform:scaleY(0.3);background-color:green;}
50% {transform:scaleY(1);background-color:orange;}
100% {transform:scaleY(0.3);background-color:green;}
;}

将下面代码添加到后台自定义头部html:

将下面代码添加到zibll文件夹中的function.php或func.php文件中:

 

© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片快捷回复

    暂无评论内容