function fixFontSize() {
var $html = $('html');
var remBase = $(window).width() / 10;
var fontSize = remBase;
while (true) {
var actualSize = parseInt( $html.css('font-size') );
if (actualSize > remBase && fontSize > 10) {
fontSize--;
$html.attr('style', 'font-size:' + fontSize + 'px!important');
} else {
break;
}
}
};
html rem动态计算
最新推荐文章于 2024-03-18 23:57:05 发布