【问题标题】:Resizing colorbox with previuos and next button with iframe使用 iframe 使用上一个和下一个按钮调整颜色框的大小
【发布时间】:2014-04-23 12:37:01
【问题描述】:

我正在使用彩盒 iframe。

$('.preview-popup').colorbox({
        rel: 'preview-popup',
        width: width,
        height: height,
        iframe: true,
        scrolling: false});

在颜色框中显示图像。

如何通过单击上一个和下一个按钮根据图像的高度和宽度自动调整 colobox 的大小?

任何帮助表示赞赏。

谢谢

【问题讨论】:

    标签: jquery colorbox


    【解决方案1】:

    您正在为颜色框设置宽度和高度....默认情况下它仅使用图像的高度和宽度

    colorbox documentation

    【讨论】:

    • 我正在从 iframe 中的另一个响应中渲染图像,因此无法直接在链接上获取图像参考。
    猜你喜欢
    • 2021-03-12
    • 2023-04-09
    • 2015-07-19
    • 2014-01-10
    • 1970-01-01
    • 2011-03-07
    • 1970-01-01
    • 2018-04-26
    • 2018-10-27
    相关资源
    最近更新 更多