gpt4 book ai didi

javascript - 如何使用 Angular-Gridster 保留高度?

转载 作者:行者123 更新时间:2023-11-28 18:31:33 25 4
gpt4 key购买 nike

我绞尽脑汁试图获取 .gridster-mobile 类来保留高度。目前,由于高度设置为空字符串,在移动设备中它会忽略 min_size[0]

我有一个临时修复,我只是使用媒体查询设置所有高度:

@media (max-width: 500px) {
.gridster-item{
height:120px !important;
}
}

这是 gridster 设置:

      isMobile: false, // stacks the grid items if true
mobileBreakPoint: 600, // if the screen is not wider that this, remove the grid layout and stack the items
mobileModeEnabled: true,

如何在移动模式下保留行高?

最佳答案

我发布这个问题是因为我没有找到答案,这是一个记录较少的配置设置:

saveGridItemCalculatedHeightInMobile:true

这应该可以让你省去一些麻烦。在示例配置中,它位于列表中远离其他移动设置的位置,因此很容易被忽视。

关于javascript - 如何使用 Angular-Gridster 保留高度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37888251/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com