Home  >  Article  >  Backend Development  >  thinkphp tag implements the code of bootsrtap carousel carousel

thinkphp tag implements the code of bootsrtap carousel carousel

不言
不言Original
2018-06-09 13:33:132125browse

This article introduces you to the thinkphp tag to implement the bootsrtap carousel carousel example code. It is very good and has reference value. Friends who need it can refer to it.

Because the first p of the carousel carousel needs to be set to active In order for the style to be displayed normally, the dots above also need numbers.

Use the volist tag to get the subscript while looping (foreach, for tags cannot be implemented)

<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=&#39;item <if condition="$i eq 1 ">active</if>&#39;>
<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>

The above is the content of this article All content, I hope it will be helpful to everyone's learning. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

Analysis of the method of realizing paging function in thinkPHP5

Using ThinkPHP to realize ajax-like official website search function

The above is the detailed content of thinkphp tag implements the code of bootsrtap carousel carousel. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn