标签:load pre rip elements client class style hang res
/**
* Created by fanso2o on 2016/9/7.
*/
$(document).ready(function () {
function change() {
var html = document.getElementsByTagName(‘html‘)[0];
html.style.fontSize = 20 / 375 * document.body.clientWidth + ‘px‘;
}
$(window).resize(function () {
change();
$("body").removeClass("ng-hide");
});
$(window).resize();
});
<script type="text/javascript">
window.onload = function () {
function change() {
var html = document.getElementsByTagName(‘html‘)[0];
html.style.fontSize = 10 / 375 * window.screen.width + ‘px‘;
};
window.onresize = function () {
change();
};
change();
}
</script>
标签:load pre rip elements client class style hang res
原文地址:http://www.cnblogs.com/mengruying/p/6274455.html