更改不会影响模态框的高度和重量

发布于 2024-09-12 14:10:46 字数 262 浏览 3 评论 0原文

我是 simplemodal 1.3.5 用户。我目前在我的项目中使用两种不同的模式。一种可以使用默认尺寸,但必须更大。我想更改模态宽度和高度,但脚本无法正常工作。可能是什么问题?这是我的脚本...

$('#user_picture').modal({
    opacity:80,
    overlayCss: {backgroundColor:"#fff"},
    minHeight:600,
    minWidth: 600,
})
});

I am a simplemodal 1.3.5 user. I am currently using 2 different modals in my project. One is OK with default sizes but one must be bigger. I want to change modals width and height but script does not work somehow. What can be the problem? Here is my script...

$('#user_picture').modal({
    opacity:80,
    overlayCss: {backgroundColor:"#fff"},
    minHeight:600,
    minWidth: 600,
})
});

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怪异←思 2024-09-19 14:10:46

如果不太了解 simplemodal,我的猜测是 minHeight 和 minWidth 仅在调整模态大小时使用。尝试使用 height: 600 和 width:600 手动设置宽度和高度。

编辑:
忘记提及高度和宽度是在containerCss选项中设置的,如下所示:

containerCss:{
   height:600,
   width:600
}

Without knowing simplemodal that well, my guess would be that the minHeight and minWidth are only used when resizing the modal. Try using height: 600 and width:600 to set the width and height manually.

Edit:
Forgot to mention that height and width are set in the containerCss option like this:

containerCss:{
   height:600,
   width:600
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文