![](/img/trans.png)
[英]Change size of fancybox iframe- I can change width but not height?
[英]How to change fancybox width?
我的畫廊寬度為1920寬度,高度為長,但是fancybox將我的圖像的寬度和高度設置為適合屏幕的大小,我想通過高度滾動將圖像的大小調整為適合屏幕寬度的代碼,這是我的代碼:
$.fancybox.open(attemp2.map(function (el) {
return {
src: el,
opts: {
caption: tempName,
}
};
}), {
loop: false,
toolbar: true
});
這里是我自己使用fancybox的一些代碼片段。 我按百分比調整了寬度和高度。
$(".imagebox").fancybox({
maxWidth : 600,
maxHeight : 600,
wrapCSS : 'fancy-imagebox', // add a class selector to the fancybox wrap
margin : [0, 0, 0, 0],
width : '70%',
height : '90%',
autoSize : true
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.