css公共
@charset "utf-8"; /* CSS Document */ *{ padding: 0; margin: 0; } ul,li{ list-style: none; } a{ text-decoration: none; color: inherit; } textarea,input{ outline: none; border:0; } textarea{ resize : none; } .c-style-clear{ clear: both; } .c-style-oth{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
//通过window.screen.width获取屏幕的宽度 var offWidth = window.screen.width / 25; //这里用宽度/25表示1rem取得的px document.getElementsByTagName("html")[0].style.fontSize = offWidth + 'px'; //把rem的值复制给顶级标签html的font-size