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

 

解决办法

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

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

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
  • 2021-06-22
  • 2021-08-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
  • 2021-09-07
  • 2021-04-27
相关资源
相似解决方案