- 博客(5)
- 收藏
- 关注
原创 原生JS实现h5页面rem适配
下面这段代码适用于原生js也的页面, css使用rem做为单位就ok了!var deviceWidth = document.documentElement.clientWidth;if (deviceWidth > 750) deviceWidth = 750;document.documentElement.style.fontSize = deviceWidth / 7.5 + 'px';window.onresize = function() { ...
2022-04-07 11:09:42 594
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人