gpt4 book ai didi

javascript - 如何在jquery colorbox中自定义#cboxLoadedContent的宽度

转载 作者:行者123 更新时间:2023-11-29 21:51:03 24 4
gpt4 key购买 nike

我正在使用 jquery 插件 colorbox,

我在尝试设置 div #cboxLoadedContent 的宽度和高度时遇到问题,它是 cboxContent div 的子元素,默认情况下它使用 box-sizing,我不知道 colorbox 如何计算这个 div 的宽度和高度。例如,我有父 div:

<div id="cboxContent" style="float: left; width:572px; height:396px;">

<div " id="cboxLoadedContent" style="display: block; width: 570px; overflow: auto; height: 394px;>

我可以在 cboxLoadedContent 中使用与我的 cboxcontent 相同的值吗?

提前致谢!

最佳答案

感谢您的回答。

事实上我没有使用rel:'group',

这是我的代码:

var popin_width = '572';
var popin_height = '416';
if( $('.ie8, .ie7').length )
{
popin_height = '417';
}
if( $('.ie7').length )
{
popin_height = '427';
}


$('.popin').colorbox({
inline: true,
width: popin_width,
height: popin_height,
opacity: 0.8,
overlayClose: true,
close: 'Fermer',
onOpen: function() {
$('a, :input, object').attr('tabindex', '-1');
},
onClosed: function() {
$('a, :input, object').attr('tabindex', '0');
}
});

关于javascript - 如何在jquery colorbox中自定义#cboxLoadedContent的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29253408/

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