[英]jquery change colorbox pop up size with the change of screen size
I have two html div where the first one is the wrapper of the second one , i have been showing the content of two divs with the colorbox popup . 我有两个html div,其中第一个是第二个的包装,我一直在用colorbox popup显示两个div的内容。 I want to change the size of the content and colorbox(if needed) when the screen size will be changed . 我想在更改屏幕大小时更改内容和colorbox的大小(如果需要)。 Please help me . 请帮我 。 Thanks in advance ! 提前致谢 !
This will resize the colorbox (relative to the screen) when the window dimensions change: 当窗口尺寸更改时,这将调整颜色框的大小(相对于屏幕):
$(window).resize(function() {
$.colorbox.resize({
width:"75%", //or whatever dimensions you want
height:"75%"
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.