首次单击时 Colorbox 未打开至所需的宽度和高度
我使用 colorbox 和 ajax 来提取 html 文件。当我第一次单击链接加载 colorbox 时,弹出窗口的宽度和高度太小,并且不会显示其中的图像和 div。当我第二次单击同一链接时,颜色框将打开所需的宽度和高度参数。
在脚本中,我之前将宽度设置为 false,因此它会根据内容动态调整。我开始遇到这个问题,我尝试将宽度更改为 940,但仍然存在这个问题。
有什么想法可能导致它吗?
(相关网站是 jcoledesign.com)
I'm using colorbox with ajax to pull in html files. When I click the link to load colorbox the first time the width and height of the popup are way to small and won't show the images and divs inside of them. When I click the same link the second time colorbox opens up to the desired width and height parameters.
In the script i previously had width set to false so it would adjust dynamically to the content. I began having this problem and I tried changing the width to 940, but still have this problem.
Any ideas what could be causing it?
(The site in question is jcoledesign.com)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请参阅常见问题解答中的此条目:
第一次打开 ajax/内联内容时 ColorBox 的尺寸太小
http://jacklmoore.com/colorbox/faq/#faq-img
See this entry in the FAQ:
ColorBox is sized too small the first time ajax/inline content is opened
http://jacklmoore.com/colorbox/faq/#faq-img
给图像标签明确的高度和宽度,即
变成
Give the image tag explicit height and width, i.e.
becomes
如果有人需要的话,还有一个解决方案。
您只需根据您拥有的内容设置宽度和高度即可。
:)
One more solution if anyone need for this.
You just have to set the with and height as per the content you have.
:)