1
如何限制ColorBox的最大尺寸?ColorBox最大尺寸
jQuery(document).bind('cbox_open', function(){
jQuery.colorbox.maxWidth = '90%';
jQuery.colorbox.maxHeight = '90%';
});
此代码不能正常工作。(((
如何限制ColorBox的最大尺寸?ColorBox最大尺寸
jQuery(document).bind('cbox_open', function(){
jQuery.colorbox.maxWidth = '90%';
jQuery.colorbox.maxHeight = '90%';
});
此代码不能正常工作。(((
使用Scalephotos
如果为true,如果maxWidth,maxHeight,innerWidth,innerHeight,宽度或高度已经确定,彩盒将规模照片以适合这些值的范围内。
$("a.gallery").colorbox({rel: 'gal', scalephotos:true title: function(){
var url = $(this).attr('href');
return '<a href="' + url + '" target="_blank">Open In New Window</a>';
}});
谢谢你的回答,但是从的Joomla组件automaticially称为颜色框,我可以在这种情况下使用此代码? – nup
是的,您可以使用此代码...您必须在您的代码中导入colorbox插件 –