fancybox2 固定宽度
是否有一组配置允许我打开具有固定设置宽度的 FancyBox2 弹出窗口(内联类型)?如果高度弯曲也没关系,但我希望将宽度设置为特定尺寸。
我尝试过这样的事情:
$.fancybox( {content:msg, type:"inline", title:title, autoSize:false, minWidth:"250px", width:"450px", height:h, maxWidth:"450px"} );
但是如果我的内容恰好比 450px 宽,它只是扩展视图而不是使用更多高度。
Is there a set of configs that will allow me to open a FancyBox2 popup (inline type) with a fixed, set width? It's ok if the height flexes, but I want the width set to a particular size.
I've tried something like this:
$.fancybox( {content:msg, type:"inline", title:title, autoSize:false, minWidth:"250px", width:"450px", height:h, maxWidth:"450px"} );
But if my content happens to be wider than 450px, it just expands the view rather than using more height.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该设置
450 像素宽的框。
实际上,所有整数都应该不带引号来表示其以像素为单位的值,因此正确的语法应该是:
等等。
此外,您还应该将选项
fitToView
设置为false
来固定size,否则 fancybox 将尝试重新调整框的大小以适合视口You should set
for a 450px wide box.
Actually all integer numbers should be written without quotes for their value in pixels so the correct syntax should be:
etc.
Additionally you should set the option
fitToView
tofalse
too for a fixed size, otherwise fancybox will try to re-size the box to fit within the viewport