zoukankan      html  css  js  c++  java
  • 小程序 纵向轮播 显示3列 每次滚动一个效果

    wxml

    <view class="swiper-view">
     <swiper next-margin="100rpx"  previous-margin="100rpx" class="swiper_container" vertical="true" autoplay="true" circular="true" interval="2000">
      <block wx:for="{{msgList}}">
       <swiper-item>
        <view class="swiper_item">{{item.title}}</view>
       </swiper-item>
      </block>
     </swiper>
    </view>

    wxss

    .swiper-view{
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      border-radius: 5rpx;
      background: tomato
     }
     .swiper_container {
      height: 300rpx;
       90%;
     }
      
     .swiper_item {
      height: 50rpx;
       90%;
      font-size: 26rpx;
      white-space: nowrap;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      color: white
     }

    js

    Page({
      data: {
         msgList: [
          { title: "朋友圈" },
          { title: "文章" },
          { title: "公共号" },
          { title: "小程序" },
          { title: "音乐" },
          { title: "表情" },
          { title: "订阅号" }
       ]
     }
    })

  • 相关阅读:
    molloc堆区的动态内存分配
    异常控制流(csapp)
    优化程序性能(CSAPP)
    链接及链接器
    C# 继承 多态
    virtual和abstract
    封装
    SQL数据库语句优化方法
    select 查询所有和查询所有非空
    联合查询的用法
  • 原文地址:https://www.cnblogs.com/yaoling/p/13256219.html
Copyright © 2011-2022 走看看