微信小程序开发指南

基于ColorUI的组件化页面开发


堆叠式轮播

<h1>堆叠式轮播</h1> <ul> <li>样式图例</li> </ul> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=180a399e38a848abb34274c88e453e84&amp;file=file.png" alt="" /></p> <ul> <li>示例代码</li> </ul> <pre><code class="language-html">&lt;view class="tower-swiper" bindtouchmove="towerMove" bindtouchstart="towerStart" bindtouchend="towerEnd"&gt; &lt;view class="tower-item {{item.zIndex==1?'none':''}}" wx:for="{{swiperList}}" wx:key style="--index:{{item.zIndex}};--left:{{item.mLeft}}"&gt; &lt;view class="swiper-item"&gt; &lt;image src="{{item.url}}" mode="aspectFill" wx:if="{{item.type=='image'}}"&gt;&lt;/image&gt; &lt;video src="{{item.url}}" autoplay loop muted show-play-btn="{{false}}" controls="{{false}}" objectFit="cover" wx:if="{{item.type=='video'}}"&gt;&lt;/video&gt; &lt;/view&gt; &lt;/view&gt; &lt;/view&gt;</code></pre>

页面列表

ITEM_HTML