[第十八期]子比主题列表文章封面添加动态缩略图

[第十八期]子比主题列表文章封面添加动态缩略图

教程简单,不过多介绍了,要是有不会的可以有偿远程,让博主早日玩上黑神话悟空

效果图

b9a6cb4cc3e20a8579b609d44ce9d273

参考代码

把css代码加入后台即可

/*动态圆圈*/
.item-thumbnail:before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0,0,0,0);
                transition: background .35s;
                border-radius: 8px;
                z-index: 2;
                max-width: 765px;
                margin: 0 auto;
                pointer-events: none;
            }
            .item-thumbnail:after {
                content: '';
                position: absolute;
                top: 50%;
                left: 50%;
                width: 50px;
                height: 50px;
                margin: -25px 0 0 -25px;
                background: url(https://kejiyuzhe-cos.chgskj.cn/2024/08/K.webp);
                background-repeat: no-repeat;
                background-size: 100% 100%;
                z-index: 3;
                -webkit-transform: scale(2);
                transform: scale(2);
                transition: opacity .35s,-webkit-transform .35s;
                transition: transform .35s,opacity .35s;
                transition: transform .35s,opacity .35s,-webkit-transform .35s;
                opacity: 0;
                pointer-events: none;
            }
            .item-thumbnail:hover:before {
                background: rgba(0,0,0,.5)
            }
            .item-thumbnail:hover:after {
                -webkit-transform: scale(1);
                transform: scale(1);
                opacity: 1
            }
/*文章缩略图的动态圆圈*/

大家可以把https://kejiyuzhe-cos.chgskj.cn/2024/08/K.webp链接替换成自己的图片即可(建议是1:1的LOGO)

© 版权声明
THE END
喜欢就支持一下吧
点赞48 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容