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