首页 > 微信 > 详细

微信小程序 swiper 组件坑

时间:2019-05-26 00:44:58      阅读:198      评论:0      收藏:0      [点我收藏+]

swiper 组件高度被限制为150px了,所以内容无法撑开。

 

解决办法

给这组件重新设置个高度,然后在把里面的图片设置为自动适应容器大小。图片模式设置为 宽度不变 自动适应高度

<swiper class="test" .....>
    <swiper-item>
        <image mode=‘widthFix‘ ...... />   
    </swiper-item>
</swiper>

<style>
.text{
  height:200px;
}
image{ width:100%; height:auto; } </style>

 

微信小程序 swiper 组件坑

原文:https://www.cnblogs.com/whnba/p/10924511.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!