/**
* 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>

posted on 2017-01-11 17:17  梦如影  阅读(252)  评论(0编辑  收藏  举报