zoukankan      html  css  js  c++  java
  • 微信小程序 公告上下滚动

    <!--公告-->
          <!-- <view class="notice_box">
            <view class="notice">
              <image src="/images/notice-icon.png"></image>
            </view>
    
            <view class="swiper_box">
              <swiper 
                  vertical="true"
                  autoplay="true" 
                  circular="true"
                  interval="3000"
                  duration='300'
                  easing-function='easeInOutCubic'>
                <block wx:for='{{msgList}}' wx:key='index'>
                    <swiper-item>
                      <view class="swiper-item">
                        <span class="newsp">最新</span>
                        <text class="notice-title">{{item.title}}</text>
                      </view>
                    </swiper-item>
                </block>
              </swiper>
            </view> 
          </view> -->
          <!--公告-->
    /*
    *公告栏
    */
    .notice_box{
      /* margin:   0 20rpx; */
      width: 95%;
      margin: 0 auto;
      display: flex;
      flex-direction: row;
      height: 80rpx;
      background-color: white;
    }
    .notice{
      padding: 0 20rpx;
      display: flex;
      align-items: center;
    }
    .notice_box swiper{
      height: 40px!important;
    }
    .notice image{
      width: 90px;
      height: 17px;
    }
    .swiper_box{
      width: 100%;
      padding-top: 22rpx;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      letter-spacing: 2px;
    }
    .swiper-item {
      font-size: 12px;
      display: flex;
    }
    .newsp{
      color: #DE797D;
      font-size: 11px;
      background-color: #FBEDED;
      text-align: center;
      width: 31px;
      border-radius: 3px;
      display: block;
      height: 16px;
    }
    .notice-title{
      overflow:hidden;
      text-overflow:ellipsis;
      white-space: nowrap;
      color:#343434;
      padding-left:6px;
    }

    msgList的数据

    msgList:[
          { title: '河南,咱们一起扛' },
          { title: '女足首战' },
          { title: '雄鹿总冠军!!!' }
    ],
  • 相关阅读:
    一个基于Angular+Ionic+Phonegap的混合APP实战
    Kafka
    kafka
    Kafka
    归并排序
    插入排序
    CC1310的晶振问题
    CC1310的RSSI值问题
    CC1310之使用SMARTRF STUDIO
    CC1310电源
  • 原文地址:https://www.cnblogs.com/QW-lzm/p/15040522.html
Copyright © 2011-2022 走看看