rem布局js设置字体

var scale = $('body').width() / 750;
$('html').css('font-size', 100 * scale + 'px');
window.onresize = function () {
var scale = $('body').width() / 750;
$('html').css('font-size', 100 * scale + 'px');
};

posted @ 2018-01-22 18:09  我有饼干吃  阅读(143)  评论(0)    收藏  举报