thinkphp標籤實現bootsrtap輪播carousel的代碼

來源:互聯網
上載者:User
這篇文章給大家介紹thinkphp標籤實現bootsrtap輪播carousel執行個體代碼,非常不錯,具有參考借鑒價值,需要的的朋友參考下

由於輪播carousel第一個p需要設定active樣式才能正常顯示,上面的圓點也同樣需要數字,

使用volist標籤在迴圈的同時可以取得下標(foreach,for標籤實現不了)

<p class="Container"><!-- carousel --><p id="carousel-example-generic" class="carousel slide" data-ride="carousel"><ol class="carousel-indicators"><volist name="bopic" id="xt"><li data-target="#carousel-example-generic" data-slide-to="{$i-1}" class="<if condition="$i eq 1 ">active</if>"></li></volist></ol><p class="carousel-inner"><volist name="bopic" id="xt"><p class='item <if condition="$i eq 1 ">active</if>'><img src="{$xt.page_bopic_image}" alt="{$xt.page_bopic_seo}"/></p></volist></p><a class="left carousel-control" href="#carousel-example-generic" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a><a class="right carousel-control" href="#carousel-example-generic" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a></p><!-- /.carousel --></p>

以上就是本文的全部內容,希望對大家的學習有所協助,更多相關內容請關注topic.alibabacloud.com!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.