我正在使用 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/