小程序学习之轮播图显示不全问题
来源:互联网 发布:怎么做淘宝达人 编辑:程序博客网 时间:2024/05/17 23:52
直接上代码
index.js
//index.jsPage({ data: { background: ["http://59.151.121.92:8001/hx-manager/file/banner/x6lEL28CRV7AMFZ0zP5N81280P1035.jpg", "http://59.151.121.92:8001/hx-manager/file/banner/ng6i41IT167p314hd9f28536LScLB2.jpg", "http://59.151.121.92:8001/hx-manager/file/banner/636596Sf8eO65nzewE8nqwVxkYV8ZN.jpg"], indicatorDots: true, vertical: false, autoplay: false, interval: 3000, duration: 1200, }, onLoad: function () { this.setData({ autoplay: !this.data.autoplay }) }})
index.wxml
<!--index.wxml--><view class="page"><view> <swiper class="swiper_box" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}"> <block wx:for="{{background}}" wx:key="*this"> <swiper-item> <image src="{{item}}"></image> </swiper-item> </block> </swiper></view></view>
index.wxss
/**index.wxss**/.swiper-item{ width: 100%; display: block; height: 150px;}.swiper_box { height: 400rpx; width: 100%;}swiper-item image { height: 100%; width: 100%; display: inline-block; overflow: hidden;}
关键在这 height: 400rpx; 直接覆盖swiper的高度
0 0
- 小程序学习之轮播图显示不全问题
- Android学习 之 问题&解答 ScrollView中嵌套ListView时显示不全的简便解决方案
- Android学习 之 问题&解答 ScrollView中嵌套ListView时显示不全的简便解决方案
- listview显示不全问题
- 布局显示不全问题
- MyEclipse/Eclipse运行程序后console显示信息不全问题
- Unity3d学习笔记 dropDown的item显示不全问题
- Android之ScrollView嵌套ListView显示不全的问题
- 微信小程序图片显示不全
- EXT3日历显示不全问题
- 高分辨率AVD显示不全问题
- listview底部显示不全问题
- msChart坐标显示不全问题
- jsp页面显示不全问题
- GridPanel显示不全的问题
- IOS 模拟器显示不全问题
- ScrollView显示不全的问题
- WKWebView 内容显示不全问题
- docker 无法挂载目录的经过
- 别被Express的API搞晕了
- 奖学金
- mybatis报“com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL s”
- Android中PopupWindow的使用
- 小程序学习之轮播图显示不全问题
- 《笨办法学python(第三版)》之任务0
- CSS3-font和字体基本样式
- 三个数排序_java
- vijos P1739计算系数 (组合数学)
- [密码] 加盐密码哈希:如何正确使用
- VS该文件正由另一进程使用,无法保存此文件
- Freescale camera 处理记录
- OpenCV — 人脸识别