ionic-framework - 在 Ionic 中,如何通过 ion-content 可滚动将 ion-slides autoHeight 设置为 true?

标签 ionic-framework swiper

我希望 slider 根据事件幻灯片高度调整其大小。

有一个选项 autoHeight:true 但它不起作用

options:
{
 autoHeight:true
}

仅当 ion-content scroll 设置为 false 时才有效

最佳答案

我可以用这个css在ionic中制作swiper以具有自动高度大小

.swiper-wrapper {
  position: relative;  
}

我的选项只是 ionic 文档中显示的默认选项
vm.options = {
  loop: true,
  effect: 'fade',
  speed: 500,
};

关于ionic-framework - 在 Ionic 中,如何通过 ion-content 可滚动将 ion-slides autoHeight 设置为 true?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36303456/

相关文章:

javascript - Ionic 选项卡菜单项隐藏

javascript - Angular JS (Ionic) 数据数组到 $scope 元素

html - Ionic ion-nav-buttons 大小和样式

javascript - ionic ion-scroll 滚动父页面

reactjs - 如何在不使用固定 CSS 的情况下更改 React JS 中的 Swiper 高度或滑动宽度

android-studio - 如何在 Flutter 中更改 Swiper 分页颜色?

android - Android 中的资源无法正确显示图标和启动画面

svelte - 带有 Sveltekit : no "swiping" 的 Swiper

html - Swiper slider SVG 图标有时不显示在 Angular Material svg 图标中