亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

圖片適應問題

https://img1.sycdn.imooc.com//5bdbe30c0001944406040365.jpg

像這種的話寫什么代碼可以解決?

正在回答

2 回答

wxml代碼:

<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" indicatorColor="{{indicatorColor}}" indicatorActiveColor="{{indicatorActiveColor}}">

? ? <block wx:for="{{imgUrls}}">

? ? ? <swiper-item>

? ? ? ? <image src="{{item}}" class="slide-image" width="355" height="150" />

? ? ? </swiper-item>

? ? </block>

? </swiper>?

樣式:

swiper {

? width: 100%;

? height: 340rpx;

}

JS

? data: {

? ? // 輪播

? ? ?imgUrls: [

? ? ? ?'/images/banner/banner1.jpg',

? ? ? ?'/images/banner/banner2.jpg',

? ? ? '/images/banner/banner3.jpg',

? ? ?],

? ? // 是否顯示面板指示點

? ? indicatorDots: true,

? ? // 是否自動切換

? ? autoplay: true,

? ? // 自動切換時間間隔

? ? interval: 5000,

? ? // 滑動動畫時長

? ? duration: 1000,

? ? // 是否采用銜接滑動

? ? circular: true,

? ? // 指示點顏色

? ? indicatorColor: "white",

? ? // 當前選中的指示點顏色

? ? ?indicatorActiveColor: "red",

? },

注意:圖片大小按iphone6的尺寸來,640x300像素即可。

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

圖片適應問題

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號