返回列表 发布新帖
查看: 89|回复: 0

[代码技巧] 子比主题 – 首页左侧快捷导航美化

[复制链接]
SunJu_FaceMall
社区贡献

315

主题

190

回帖

1万

积分

等级头衔
Icon组别 : 管理员
Icon等级 :

积分成就
   钻石 : 524 颗
   贡献 : 1849 点
   金币 : 12 枚
Icon在线时间 : 1297 小时
Icon注册时间 : 2024-11-22
Icon最后登录 : 2025-12-9

荣誉勋章

会员LV.1会员LV.2会员LV.3会员LV.4会员LV.5会员LV.6会员LV.7会员LV.8会员LV.9会员LV.10

风云·优秀版主

飞流名人堂成员

1

实名认证 手机认证 vip vip-year FLLTCN发表于 2025-10-6 21:42:18 | 查看全部 |阅读模式 浙江金华

资源无需等待,交易就趁现在,全面资源整合网络大咖云集,让你轻松玩转互联网!

您需要 登录 才可以下载或查看,没有账号?立即注册

×
一款非常好看的PC首页左侧快捷导航的美化,可以看一下下面图片的演示图,给自己的子比主题加一个列表美化的样式吧,喜欢的自行部署吧
image.webp
代码部署
一共三个地方,跟着我的步骤走不会有任何问题,话不多说直接开始!
index代码(第一步)
我们先到:/wp-content/themes/zibll/index.php文件里面我们将下面的代码放到</main>的下面
#号 zuixinfabu 不要动,后面跟的两个分类的bbmh和zbmh是分类别名。跳转至对应的卡片列表,如果你想要跳转到哪个小工具那个地方你加一个<div id=”标签名字”>,然后改下面的代码#标签即可!
  1. <ul id="menu" class="ontop show" style="background:var(--main-bg-color);">
  2.     <a class="scroll-link" href="javascript:(scrollTo('#zuixinfabu',-1));" rel="external nofollow" ><li title="最新发布"   style="color:var(--key-color);" class="">最新发布</li></a>
  3.     <a class="scroll-link" href="javascript:(scrollTo('#bbmh',-1));" rel="external nofollow" ><li title="B2美化"   style="color:var(--key-color);" class="">B2美化</li></a>
  4.     <a class="scroll-link" href="javascript:(scrollTo('#zbmh',-1));" rel="external nofollow" ><li title="子比美化"   style="color:var(--key-color);" class="">子比美化</li></a>
  5.     <a class="scroll-link" href="javascript:(scrollTo('#Onecad-tuijian',-1));" rel="external nofollow" ><li title="人气作者"   style="color:var(--key-color);" class="">人气作者</li></a>
  6.   <a class="scroll-link" href="javascript:(scrollTo('#syphb',-1));" rel="external nofollow" ><li title="排行榜"   style="color:var(--key-color);" class="">排行榜</li></a>
  7.   </ul>
复制代码
css代码(第二步)
将下面的代码放到:子比主题–>>自定义CSS样式即可!
  1. /** 首页侧边导航直达条开始 **/

  2. @media (max-width: 768px) {
  3.      ul#menu {
  4.         display: none!important;
  5.     }  
  6. }

  7. ul#menu {
  8.     position: fixed;
  9.     left: 0;
  10.     top: 40%;
  11.     width: 120px;
  12.     transform: translateY(-45%);
  13.     background-color: #fff;
  14.     box-shadow: 0 4px 8px 0 rgb(108 0 255 / 10%);
  15.     border-radius: 0 8px 8px 0;
  16.     text-align: center;
  17.     color: #6d7278;
  18.     z-index: 999;
  19.     user-select: none;
  20. }

  21. #menu li {
  22.     position: relative;
  23.     padding: 13px 0;
  24.     cursor: pointer;
  25.     transition: color .2s;
  26. }



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


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

  38.     /* 单行文章列表美化——开始 */
  39.     .posts-item.card:last-child {
  40.     margin-bottom: 8px!important;
  41. }
  42.     .training-camp__wrapper .header__title-wrapper{
  43.             
  44.     font-size: 16px;
  45.     }
  46.         .sec-wrapper {
  47.             margin-bottom: 10px;
  48.         }

  49. .training-camp__wrapper .header__title-wrapper{
  50.     color:#22ab80;
  51. }
  52.         .training-camp__wrapper {
  53.      
  54.             background-image: linear-gradient(150deg,#cff0fb 20%,#cbf4e4 40%);
  55.             padding: 0 12px 12px;
  56.             border-radius: 16px;
  57.         }

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

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

  70.         .training-camp__wrapper .header__title-wrapper {
  71.             display: -webkit-flex;
  72.             display: flex;
  73.             -webkit-align-items: center;
  74.             align-items: center;
  75.             
  76.         }

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

  80.         .training-camp__wrapper .header__btn-wrapper {
  81.             margin-left: auto;
  82.             display: -webkit-flex;
  83.             display: flex;
  84.         }

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

  90.         .training-camp__wrapper .header__btn {
  91.             display: -webkit-flex;
  92.             display: flex;
  93.             -webkit-align-items: center;
  94.             align-items: center;
  95.             font-size: 14px;
  96.             color: #22ab80;
  97.         }

  98.         .medium---OGt5iw {
  99.             height: 36px;
  100.             padding: 8px 24px;
  101.             font-size: 14px;
  102.         }

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

  107.         .button---AUM5ZP {
  108.             position: relative;
  109.             display: inline-block;
  110.             height: 36px;
  111.             padding: 8px 24px;
  112.             border-radius: 22px;
  113.             cursor: pointer;
  114.             border: unset;
  115.             font-size: 14px;
  116.             -webkit-user-select: none;
  117.             -moz-user-select: none;
  118.             user-select: none;
  119.         }

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

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

  128.         .sec-wrapper .sec-bd {
  129.             position: relative;
  130.             display: -webkit-flex;
  131.             display: flex;
  132.             -webkit-flex-wrap: wrap;
  133.             flex-wrap: wrap;
  134.             
  135.         }

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

  140.         img.title-macyingyong {
  141.             /* width: 120px; */
  142.             height: 50px;
  143.         }
  144.      .posts-item.card {
  145.     padding: 35px 10px 10px 10px!important;
  146. }
  147.     .posts-item {
  148.     position: relative !important;
  149. }
  150.     .posts-item.card::before {
  151.     content: "";
  152.     display: block;
  153.     background: #fc625d;
  154.     top: 13px;
  155.     left: 15px;
  156.     border-radius: 50%;
  157.     width: 9px;
  158.     height: 9px;
  159.     box-shadow: 16px 0 #fdbc40, 32px 0 #35cd4b;
  160.     margin: 0px 2px -7px;
  161.     z-index: 1000;
  162.     position: absolute;
  163. }
  164.    
  165.    
  166.         /* 单行文章列表美化——结束 */
复制代码

首页配置(第三步)
打开:子比主题–>>页面&显示–>>首页配置,将下面的代码放到显示标题里面即可
image.webp
  1. <p id="zuixinfabu">最新发布</p>
复制代码
[/zhedie]

本帖被以下淘专辑推荐:

路虽远,行则将至;事虽难,做则必成。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

飞流广播+ 发布

系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
10-30 17:02
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
10-09 09:07
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
09-24 09:00
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
09-11 11:40
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
09-02 09:17
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
08-27 08:56
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
08-20 15:12
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
08-03 10:22
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
06-30 08:57
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
06-18 09:14
系统消息:清风网络已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
04-11 09:40
系统消息:清风网络已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-10 09:31
系统消息:IXM77777已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-09 13:44
系统消息:清风网络已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-09 09:22
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
04-09 08:52
系统消息:清风网络已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-08 09:24
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
04-07 09:02
系统消息:柒沐已经连续答对10道难题,逆天学霸谁与争锋?!#每日答题#
02-27 09:35
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
02-26 09:06
系统消息:柒沐已经连续答对3道难题,逆天学霸谁与争锋?!#每日答题#
02-25 08:49
站内通告

提供资源交易、信息共享、靓号交流、技术变现、学习问答、兴趣娱乐等全面服务。

1.丰富功能系统,扩展社区特色玩法,打造最好的互联网聚集圈子。

2.准确信息真实交易,安全快捷又方便,让虚拟交易面对面。

3. 天上不会掉馅饼,话术骗术迷人心,切勿脱离平台线下交易,被骗与平台无关!

4. 欺诈骗钱,违规违法将视情受到警告&禁言&封号甚至检举至👮🏻‍♀️处理!

官方Q群:123129钉推群:BAYR2383 站长QQ:3220000000

投诉/建议/商务合作联系

fl@fllt.cn

严禁私下交易,被骗与本站无关。
违反交易细则,取证立查严惩。
  • 钉钉新帖推送群
  • 官方交流QQ群
  • 站长唯一微信号

👮曝光Ta|🧿小黑屋|📴手机页|飞流网 ( 渝ICP备2025054677号-1|电信增值许可 渝B2-20250789 )|网站地图

GMT+8, 2025-12-10 13:46 , Processed in 0.098967 second(s), 61 queries, MemCached On , Gzip On.

Based on XJ-TX X3.5 Licensed

飞流论坛 HanAnalytics icp Astro vhAstro-Theme

关灯 在本版发帖
扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表