rem
rem是CSS3新增的一个相对单位(root em,根em,通过它既可以做到只修改根元素就成比例地调整所有字体大小,又可以避免字体大小逐层复合的连锁反应。
var setRem = {
init: function() {
function set() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 750*100 + 'px';
}
window.onresize = set