大数据可视化自适应屏幕尺寸

大数据可视化自适应屏幕尺寸

// JavaScript Document
function resize_win(){
var win_w = $(window).width(),
win_h = $(window).height();
var ratioX = win_w / 1920,
ratioY = win_h / 1080;
//ratioY = ratioX;
$('body').css({
          transform: "scale(" + ratioX + ", " + ratioY + ")",
          transformOrigin: "left top",
          /*backgroundSize: "100% " + ratioY * 100 + "%",*/
});
//$('html,body').css('overflow','hidden');
}

$(function(){
$(window).resize(function(){
resize_win();
}).resize();   
});

发表评论

邮箱地址不会被公开。 必填项已用*标注