This commit is contained in:
2022-08-31 11:03:20 +08:00
commit 069f64ed21
144 changed files with 25876 additions and 0 deletions

12
src/config/rem.js Normal file
View File

@@ -0,0 +1,12 @@
(function (doc, win) {
var docEl = doc.documentElement
var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
var recalc = function () {
var clientWidth = docEl.clientWidth
if (!clientWidth) return
docEl.style.fontSize = 100 * (clientWidth / 750) + 'px'
}
if (!doc.addEventListener) return
win.addEventListener(resizeEvt, recalc, false)
doc.addEventListener('DOMContentLoaded', recalc, false)
})(document, window)