A solution that USES the resize event when the browser window size changes does not work on the framework
- 2020-03-30 02:55:40
- OfStack
The resize event does not work for the framework when the browser window size changes, as follows:
$(window).resize(function(){
var surH = $(window).height();
$(".pic_conent").height(surH);
}
When the browser changes, pull the size, there is no response;
Method 1: add to the label; OnLoad = "" onResize =" & "have spent Method Method 2: window.onresize=function(){///... Write the corresponding code in the method, and the two methods can basically solve your problem
window.onresize=function(){
var surH = $(window).height();
$(".pic_conent").height(surH);
}