子比主题美化-文章缩略图封面底部和右上角添加可自定义的文字描述

子比主题文章缩略图封面标识功能,底部和右上角添加可自定义的文字描述,带高斯模糊效果,并且可以美观一下自己的缩略图的封面样式,非常使用,暂时仅支持后台编辑时添加

图片[1]-子比主题美化-文章缩略图封面底部和右上角添加可自定义的文字描述-懒人Blog(资源素材网)

/inc/functions/zib-posts-list.php代码

    if (get_post_meta($post->ID, 'mh_text', true)){
        $sticky .= '<style>
              /**文章封面美化开始*/
            .posts-item.card .item-thumbnail {
                background: #c4cffa26;
                width: 100%;
                padding-bottom: var(--posts-card-scale);
            }

            a.item-category {
                position: absolute;
                left: 10px;
                top: 10px;
                padding: 5px 6px;
                font-size: 1rem;
                line-height: 1;
                color: #fff;
                background: rgb(54 117 255 / 19%);
                -webkit-backdrop-filter: blur(10px);
                backdrop-filter: blur(10px);
                border-radius: 6px;
            }

            a.item-category-app {
                position: absolute;
                height: 24px;
                line-height: 24px;
                width: 100%;
                text-align: center;
                bottom: 0;
                left: 0;
                background: radial-gradient(circle,#3783ff,#3783ffbf);
                color: #fff;
                font-size: 12px;
                border-radius: 0 0 10px 10px;
            }

            a.item-category-app-b {
                position: absolute;
                height: 24px;
                line-height: 24px;
                width: 100%;
                text-align: center;
                bottom: 0;
                left: 0;
                background: radial-gradient(circle,#ff5631,#ff5631ba);
                color: #fff;
                font-size: 12px;
                border-radius: 0 0 10px 10px;
            }

            a.item-category-app-c {
                position: absolute;
                height: 24px;
                line-height: 24px;
                width: 100%;
                text-align: center;
                bottom: 0;
                left: 0;
                background: radial-gradient(circle,#464242,#464242ad);
                color: #fff;
                font-size: 12px;
                border-radius: 0 0 10px 10px;
            }

            /**文章封面美化结束*/
            
            /** 壁纸标题毛玻璃 **/
            span.bottom-l {
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            .n-collect-item-bottom {
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                height: 34px;
                background: rgba(0,0,0,.2);
                border-radius: 0 0 4px 4px;
                -webkit-backdrop-filter: saturate(180%) blur(20px);
                backdrop-filter: saturate(180%) blur(20px);
                font-size: 13px;
                color: #fff;
                text-shadow: 0 2px 2px rgba(0,0,0,.16);
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-align: center;
                -ms-flex-align: center;
                align-items: center;
                -webkit-box-pack: justify;
                -ms-flex-pack: justify;
                justify-content: space-between;
                padding: 0 18px;
                z-index: 5;
            }
            </style>';
        $right = get_post_meta($post->ID, 'right_text', true);
        $bottom = get_post_meta($post->ID, 'bottom_text', true);
        if ($right){
            $sticky .= '<a class="item-category"> '.$right.' </a>';
        }
        if ($bottom){
            $sticky .= '<div class="n-collect-item-bottom"><span class="bottom-l">'.$bottom.'</span></div>';
        }
    }
图片[2]-子比主题美化-文章缩略图封面底部和右上角添加可自定义的文字描述-懒人Blog(资源素材网)

/inc/options/metabox-options.php代码


👋 感谢您的观看,对您有用就分享出去吧 !

如您有好的资源/素材,可参与创作者激励计划享投稿分成。分成介绍
投稿成功收录,即可获得 1-10元/篇奖励。(重复内容无奖励)
本站代码模板仅供学习交流使用请勿商业运营,严禁从事违法,侵权等任何非法活动,否则后果自负!
子比主题美化-文章缩略图封面底部和右上角添加可自定义的文字描述-懒人Blog(资源素材网)
子比主题美化-文章缩略图封面底部和右上角添加可自定义的文字描述
此内容为付费阅读,请付费后查看
200积分
安全资源
自动发货
永久使用
售后服务
付费阅读
已售 5
© 版权声明
THE END
文章不错?点个赞呗
点赞3赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容

随机看看好帖需要善于发现
热门圈子总有聊不完的话题