分享
  • 收藏
  • 举报
    X
    请问一下栏目循环输出内容,送分168个
    • 店小二 消费26.8元 2022-05-23 14:29 14:29
    466
    21

    比如我栏目有

    分类一

    ------栏目一

    ------------内容标题

    分类二

    ------栏目二

    ------------内容标题

    分类三

    ------栏目三

    ------------内容标题

    分类四

    ------栏目四

    ------------内容标题


    也就是大分类下面有栏目,栏目下面有内容,我希望循环输出分类栏目下面的内容,不显示栏目,只显示分类


    分类一

    ------------内容标题

    ------------内容标题

    分类二

    ------------内容标题

    ------------内容标题

    分类三

    ------------内容标题

    ------------内容标题

    分类四

    ------------内容标题

    ------------内容标题


    1
    赏礼
    赏钱
    收藏
    点击回复
        全部留言
    • 21
    • 银杏114在线 实战运营者 消费:3609.79元 2022-05-23 21:06 21:066楼
      <div class="MainCont2">
      <div class="HeadStyle1"><span>推荐供应</span><a href="fenlei/">更多>></a></div>
          <div class="MoreSideInfo">

      {volist name=":sort_config('fenlei',0)" id="name"}
              <dl class="slidecont">
      <dt class="head"><span>{$name}</span><a href="/fenlei/list-{$key}.html">更多>></a></dt>
                  <dd class="cont">
               {qb:tag name="pc_fenlei_index_a1" type="fenlei" rows="7" order="id" by="desc" where="fid=$key"}
        <div class="list"><span>{$i}</span><a href="{$rs.url}">{$rs.title}</a></div>
                {/qb:tag}

                  </dd>
              </dl>
              {/volist}

          </div>
      </div>
      银杏114在线 消费:3609.79元 2022-05-23 21:07
      好像离你的要求不是完全吻合,但请结合官方给出的方法自行修改
      银杏114在线 消费:3609.79元 2022-05-23 21:07
      这段代码是我之前用的,现在从本地调试那里截图谨供参考
      银杏114在线 消费:3609.79元 2022-05-23 21:08


      银杏114在线 消费:3609.79元 2022-05-23 21:09
      不过要达到这种显示方式,还应该调配相应的CSS
      银杏114在线 消费:3609.79元 2022-05-23 21:13
      需要CSS可以私聊,我单独发你
      银杏114在线 消费:3609.79元 2022-05-23 21:14
      .MiddleBanner{
      width:1200px;
      overflow:hidden;
      margin:15px auto 0 auto;
      text-align:center;
      }
      .MainCont1{
      display:table;
      width:1200px;
      margin:15px auto 0 auto;
      }
      .MainCont1 .Left,.MainCont1 .Right{
      display:table-cell;
      vertical-align:top;
      }
      .MainCont1 .Left{
      width:860px;
      padding-right:20px;
      }
      .MainCont1 .Right{
      width:320px;
      background:#EDEDED;
      }
      .HeadStyle1{
      height:50px;
      overflow:hidden;
      border-top:#1CB29D solid 2px;
      border-bottom:#ddd solid 1px;
      position:relative;
      }
      .HeadStyle1 span{
      float:left;
      font:26px 'Microsoft Yahei','Simsun';
      font-weight:bold;
      line-height:50px;
      }
      .HeadStyle1 a{
      display:block;
      width:60px;
      height:30px;
      text-align:center;
      line-height:30px;
      position:absolute;
      right:0;
      bottom:8px;
      font-size:14px;
      }
      .HeadStyle1 a:hover{
      background:#369;
      color:#FFF;
      border-radius:3px;
      }
      .ListNewsInfo{
      width:860px;
      overflow:hidden;
      }
      .ListNewsInfo ul{
      width:950px;
      padding:10px 0 0 0;
      }
      .ListNewsInfo ul:after{
      content:'';
      display:block;
      width:950px;
      height:1px;
      clear:both;
      }
      .ListNewsInfo ul li{
      height:35px;
      line-height:35px;
      width:315px;
      padding:0 70px 0 5px;
      margin:0 80px 0 0;
      overflow:hidden;
      float:left;
      font-size:14px;
      position:relative;
      }
      .ListNewsInfo ul li:hover{
      background:#369;
      border-radius:5px;
      }
      .ListNewsInfo ul li a:nth-child(1){
      color:#666;
      padding-right:3px;
      }
      .ListNewsInfo ul li:hover a{
      color:#FFF;
      }
      .ListNewsInfo ul li:hover a:nth-child(1){
      color:#F90;
      }
      .ListNewsInfo ul li span{
      display:block;
      width:60px;
      text-align:right;
      position:absolute;
      right:5px;
      top:0;
      color:#999;
      }
      .AcitonBut{
      padding:5px;
      }
      .AcitonBut:after{
      content:'';
      display:block;
      width:300px;
      height:1px;
      clear:both;
      }
      .AcitonBut li{
      width:50%;
      height:50px;
      overflow:hidden;
      padding-top:15px;
      float:left;
      }
      .AcitonBut li a{
      display:block;
      background:#4FC7CE;
      width:105px;
      height:50px;
      line-height:50px;
      margin:auto;
      border-radius:5px;
      padding-left:25px;
      text-align:center;
      font-size:16px;
      color:#FFF;
      }
      .AcitonBut li a.post{
      background:#4FC7CE url(icon1.png) 10px 16px no-repeat;
      }
      .AcitonBut li a.post:hover{
      background:#0C676C url(icon1.png) 10px 16px no-repeat;
      }
      .AcitonBut li a.mg{
      background:#FF9999 url(icon2.png) 18px 16px no-repeat;
      }
      .AcitonBut li a.mg:hover{
      background:#8D0F0F url(icon2.png) 18px 16px no-repeat;
      }
      .AcitonBut li a.edit{
      background:#A8BE3F url(icon3.png) 10px 16px no-repeat;
      }
      .AcitonBut li a.edit:hover{
      background:#637412 url(icon3.png) 10px 16px no-repeat;
      }
      .AcitonBut li a.rz{
      background:#E39549 url(icon4.png) 18px 15px no-repeat;
      }
      .AcitonBut li a.rz:hover{
      background:#704214 url(icon4.png) 18px 15px no-repeat;
      }
      .MemberCont{
      width:300px;
      margin:15px auto 0 auto;
      padding:15px 0 10px 0;
      border-top:#DDD solid 1px;
      }
      .MemberCont dl{
      display:table;
      width:100%;
      }
      .MemberCont dl dt,.MemberCont dl dd{
      display:table-cell;
      padding:5px;
      vertical-align:middle;
      font-size:14px;
      }
      .MemberCont dl dt{
      width:120px;
      }
      .MemberCont dl dt input{
      width:120px;
      height:30px;
      border:#DDD solid 1px;
      border-radius:5px;
      text-indent:5px;
      }
      .MemberCont dl dd{
      line-height:25px;
      }
      .MemberCont dl dd input{
      background:#BDCE6C url(line.png) center 2px no-repeat;
      border:none;
      width:60px;
      height:30px;
      margin-right:10px;
      border-radius:3px;
      color:#FFF;
      position:relative;
      }
      .MemberCont dl dd input:hover{
      background:#6C7D18 url(line.png) center 2px no-repeat;
      }
      .MemberCont dl dt.headicon{
      width:100px;
      }
      .MemberCont dl dt.headicon div{
      width:100px;
      height:100px;
      overflow:hidden;
      margin:auto;
      text-align:center;
      line-height:100px;
      border-radius:50px;
      background:#FFF;
      }
      .MemberCont dl dt.headicon div img{
      max-width:100px;
      max-height:100px;
      vertical-align:middle;
      }
      .MemberCont dl dd ul.info li{
      height:22px;
      overflow:hidden;
      line-height:22px;
      }
      .MemberCont dl dd ul.info{
      margin-bottom:5px;
      }
      /***/
      .MainCont2{
      width:1200px;
      overflow:hidden;
      margin:15px auto 0 auto;
      }
      .MoreSideInfo{
      width:1230px;
      display:table;
      }
      .MoreSideInfo .slidecont{
      display:table-cell;
      width:380px;
      padding-right:30px;
      padding-top:10px;
      vertical-align:top;
      }
      .MoreSideInfo .slidecont .head{
      height:35px;
      position:relative;
      }
      .MoreSideInfo .slidecont .head span{
      display:block;
      float:left;
      line-height:35px;
      font-size:16px;
      font-weight:bold;
      position:relative;
      }
      .MoreSideInfo .slidecont .head span:after{
      content:'';
      display:block;
      width:100%;
      height:2px;
      position:absolute;
      left:0;
      bottom:-1px;
      background:#EF8D00;
      z-index:1000;
      }
      .MoreSideInfo .slidecont .head a{
      display:block;
      width:50px;
      height:25px;
      text-align:center;
      line-height:25px;
      position:absolute;
      right:0;
      bottom:3px;
      color:#888;
      }
      .MoreSideInfo .slidecont .head a:hover{
      background:#EF8D00;
      border-radius:3px;
      color:#FFF;
      }
      .MoreSideInfo .slidecont .list{
      height:40px;
      line-height:40px;
      overflow:hidden;
      position:relative;
      border-top:#DDD solid 1px;
      padding-left:32px;
      font-size:14px;
      }
      .MoreSideInfo .slidecont .list:hover{
      background:#EFEFEF;
      }
      .MoreSideInfo .slidecont .list span{
      display:block;
      width:20px;
      height:20px;
      text-align:center;
      line-height:20px;
      position:absolute;
      top:9px;
      left:5px;
      background:#CBCAC6;
      font-style:italic;
      color:#FFF;
      }
      .MoreSideInfo .slidecont .list:nth-child(1) span,.MoreSideInfo .slidecont .list:nth-child(2) span,.MoreSideInfo .slidecont .list:nth-child(3) span{
      background:#1CB29D;
      }
      /***/
      .FenlieSorts{
      width:1200px;
      overflow:hidden;
      margin:15px auto 0 auto;
      }
      .FenlieSorts dl{
      display:table;
      width:100%;
      border-bottom:#DDD solid 1px;
      }
      .FenlieSorts dl:nth-child(1){
      border-top:#DDD solid 1px;
      }
      .FenlieSorts dl:hover{
      background:#EFEFEF;
      }
      .FenlieSorts dl dt,.FenlieSorts dl dd{
      display:table-cell;
      padding:10px;
      vertical-align:middle;
      border-left:#DDD solid 1px;
      }
      .FenlieSorts dl dt{
      width:120px;
      border-left:0px;
      }
      .FenlieSorts dl dt a{
      display:block;
      height:35px;
      line-height:35px;
      overflow:hidden;
      text-align:right;
      font-size:16px;
      color:#666;
      padding-right:5px;
      }
      .FenlieSorts dl dt a:hover{
      background:#369;
      color:#FFF;
      border-radius:5px;
      }
      .FenlieSorts dl dd ul li{
      width:16%;
      height:35px;
      overflow:hidden;
      line-height:35px;
      float:left;
      text-indent:10px;
      font-size:16px;
      margin:5px 0 5px 0;
      }
      .FenlieSorts dl dd ul li a{
      color:#0F76CE;
      }
      .FenlieSorts dd ul li:hover{
      background:#F90;
      border-radius:5px;
      }
      .FenlieSorts dd ul li:hover a{
      color:#FFF;
      }
      袁冬 消费:160.85元 华为 2022-05-23 21:43
      真六
      谷歌歌 消费:904.42元 2022-05-24 07:39
      666
      袁冬 消费:160.85元 华为 2022-05-24 10:52
      margin:15px auto 0 auto;
      这个好像可以简化一下  四个值改成三个值
      margin:15px(上) auto(左右) 0(下)
      银杏114在线 消费:3609.79元 华为 2022-05-24 11:23
        
      店小二 消费:26.8元 2022-05-24 17:48
      这样是栏目下面的,而不是分类下面
      银杏114在线 消费:3609.79元 华为 2022-05-24 18:06
      谨供参考
    0 赏钱 赏礼回复
    • 铁牛 普通粉丝 消费:0.01元 2022-05-23 19:40 19:406楼
      要写不少代码,168个积分,吸引力不大
      店小二 消费:26.8元 2022-05-24 17:48
      是的,确实有点麻烦,帮我写一个呗,加个0
    0 赏钱 赏礼回复
    • sss 实战运营者 消费:981.58元 2022-05-23 21:46 21:46
      其他手机
      6楼
      过路
    0 赏钱 赏礼回复
    • 谷歌歌 普通粉丝 消费:904.42元 2022-05-23 20:24 20:246楼
      路过帮顶
    0 赏钱 赏礼回复
    0 赏钱 赏礼回复
    更多回复
        你可能感兴趣的主题
    恢复多功能编辑器
  • 3 1
  • 推荐内容
    扫一扫访问手机版
    请选择要切换的马甲:

     
    网页即时交流
    QQ咨询
    咨询热线
    020-28998648