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插件 –