<scroll-view  scroll-x style="width: 100%;white-space: nowrap;overflow:hidden;">
        <repeat for="{{msjtUrls}}" key="id" index="index" item="item">
          <view class="items">  //item需要display:inline-block
              <image src='{{item.coursecover}}' class='img' lazy-load mode="widthFix"></image>
              <view class="coursetitle">{{item.coursetitle}}</view>
          </view>
        </repeat>  
      </scroll-view>

  

.coursetitle{
        display: inline-block;
        font-size: 30rpx;
        width: 200rpx;
        height: auto;
        white-space:normal !important; //解决文字不换行
}

  

posted on 2019-05-24 16:12  chenlw101  阅读(444)  评论(0编辑  收藏  举报