详情
评论
问答

子比主题 – 首页左侧快捷导航美化

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

一款非常好看的PC首页左侧快捷导航的美化,可以看一下下面图片的演示图,给自己的子比主题加一个列表美化的样式吧,喜欢的自行部署吧!

图片[1] - 子比主题 – 首页左侧快捷导航美化

代码部署

一共三个地方,跟着我的步骤走不会有任何问题,话不多说直接开始!

我们先到:/wp-content/themes/zibll/index.php文件里面我们将下面的代码放到</main>的下面

#号 zuixinfabu 不要动,后面跟的两个分类的bbmhzbmh是分类别名。跳转至对应的卡片列表,如果你想要跳转到哪个小工具那个地方你加一个<div id=”标签名字”>,然后改下面的代码#标签即可!

<ul id="menu" class="ontop show" style="background:var(--main-bg-color);">
    <a class="scroll-link" href="javascript:(scrollTo('#zuixinfabu',-1));" rel="external nofollow" ><li title="最新发布"   style="color:var(--key-color);" class="">最新发布</li></a>
    <a class="scroll-link" href="javascript:(scrollTo('#bbmh',-1));" rel="external nofollow" ><li title="B2美化"   style="color:var(--key-color);" class="">B2美化</li></a>
    <a class="scroll-link" href="javascript:(scrollTo('#zbmh',-1));" rel="external nofollow" ><li title="子比美化"   style="color:var(--key-color);" class="">子比美化</li></a>
    <a class="scroll-link" href="javascript:(scrollTo('#Onecad-tuijian',-1));" rel="external nofollow" ><li title="人气作者"   style="color:var(--key-color);" class="">人气作者</li></a>
  
  <a class="scroll-link" href="javascript:(scrollTo('#syphb',-1));" rel="external nofollow" ><li title="排行榜"   style="color:var(--key-color);" class="">排行榜</li></a>

  </ul>

将下面的代码放到:子比主题–>>自定义CSS样式即可!

/** 首页侧边导航直达条开始 **/

@media (max-width: 768px) {
     ul#menu {
        display: none!important;
    }  
}

ul#menu {
    position: fixed;
    left: 0;
    top: 40%;
    width: 120px;
    transform: translateY(-45%);
    background-color: #fff;
    box-shadow: 0 4px 8px 0 rgb(108 0 255 / 10%);
    border-radius: 0 8px 8px 0;
    text-align: center;
    color: #6d7278;
    z-index: 999;
    user-select: none;
}

#menu li {
    position: relative;
    padding: 13px 0;
    cursor: pointer;
    transition: color .2s;
}

 

#menu.ontop{
    opacity: 0;
    transition: .6s;
    transform: translateY(-30%);
}


#menu.show{
    opacity: 1;
    transform: translateY(-45%);
    visibility: unset;
}
/** 首页侧边导航直达条结束 **/

    /* 单行文章列表美化——开始 */
    .posts-item.card:last-child {
    margin-bottom: 8px!important;
}
    .training-camp__wrapper .header__title-wrapper{
            
    font-size: 16px;
    }
        .sec-wrapper {
            margin-bottom: 10px;
        }

.training-camp__wrapper .header__title-wrapper{
    color:#22ab80;
}
        .training-camp__wrapper {
     
            background-image: linear-gradient(150deg,#cff0fb 20%,#cbf4e4 40%);
            padding: 0 12px 12px;
            border-radius: 16px;
        }

        button.button---AUM5ZP.text---pn4pHz.medium---OGt5iw.header__btn {
            background: #ffffff00;
            border: 1px solid #fc3c2d00;
            border-radius: 0px;
        }

        .training-camp__wrapper .training-camp__header {
            padding: 24px 0 24px 12px;
            display: -webkit-flex;
            display: flex;
          
            background: url(/pic/kuangwenlu.png) 100% 0/433px 126px no-repeat;
        }

        .training-camp__wrapper .header__title-wrapper {
            display: -webkit-flex;
            display: flex;
            -webkit-align-items: center;
            align-items: center;
            
        }

        .training-camp__wrapper .title__img-wrapper {
            height: 20px;
        }

        .training-camp__wrapper .header__btn-wrapper {
            margin-left: auto;
            display: -webkit-flex;
            display: flex;
        }

        .training-camp__wrapper .header__btn-wrapper button[class*=button---] {
            height: 20px;
            line-height: 20px;
            padding: 0 12px;
        }

        .training-camp__wrapper .header__btn {
            display: -webkit-flex;
            display: flex;
            -webkit-align-items: center;
            align-items: center;
            font-size: 14px;
            color: #22ab80;
        }

        .medium---OGt5iw {
            height: 36px;
            padding: 8px 24px;
            font-size: 14px;
        }

        .outlined---BKvHAe, .text---pn4pHz {
            background-color: initial;
            color: #3e454d;
        }

        .button---AUM5ZP {
            position: relative;
            display: inline-block;
            height: 36px;
            padding: 8px 24px;
            border-radius: 22px;
            cursor: pointer;
            border: unset;
            font-size: 14px;
            -webkit-user-select: none;
            -moz-user-select: none;
            user-select: none;
        }

        .ke-icon---zeGrGg+i {
            display: inline-block;
            vertical-align: middle;
        }

        .training-camp__wrapper>div.sec-bd {
            background-color: var(--body-bg-color);
           
        }

        .sec-wrapper .sec-bd {
            position: relative;
            display: -webkit-flex;
            display: flex;
            -webkit-flex-wrap: wrap;
            flex-wrap: wrap;
            
        }

        .training-camp__wrapper .sec-bd {
            padding: 12px;
            border-radius: 16px;
        }

        img.title-macyingyong {
            /* width: 120px; */
            height: 50px;
        }
     .posts-item.card {
    padding: 35px 10px 10px 10px!important;
}
    .posts-item {
    position: relative !important;
}
    .posts-item.card::before {
    content: "";
    display: block;
    background: #fc625d;
    top: 13px;
    left: 15px;
    border-radius: 50%;
    width: 9px;
    height: 9px;
    box-shadow: 16px 0 #fdbc40, 32px 0 #35cd4b;
    margin: 0px 2px -7px;
    z-index: 1000;
    position: absolute;
}
    
    
        /* 单行文章列表美化——结束 */

打开:子比主题–>>页面&显示–>>首页配置,将下面的代码放到显示标题里面即可

图片[2] - 子比主题 – 首页左侧快捷导航美化
<p id="zuixinfabu">最新发布</p>
THE END
点赞11 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容