标签:
1、静态页面
2、缩放JS
function zoomin(orBkgWidth, orBkgHeight,bkg)
{
if(window.innerWidth || document.documentElement.clientWidth){
var widths = document.documentElement.clientWidth ? document.documentElement.clientWidth : window.innerWidth;
}
if (window.innerHeight || document.documentElement.clientHeight ) {
var heights = document.documentElement.clientHeight ? document.documentElement.clientHeight : window.innerHeight;
}
b1 = widths / orBkgWidth;
b2 = heights / orBkgHeight;
r = Math.min(b1,b2);
$(bkg).css("-ms-transform","scale(" + r+ ")");
$(bkg).css("-moz-transform","scale(" +r+ ")");
$(bkg).css("-webkit-transform","scale(" + r+ ")");
$(bkg).css("-o-transform","scale(" +r+ ")");
$(bkg).css("-webkit-transform-origin","scale(" + r+ ")");
}
标签:
原文地址:http://www.cnblogs.com/wl14253/p/5029564.html