当前位置:网站首页>The mobile terminal page uses REM for adaptation
The mobile terminal page uses REM for adaptation
2022-06-11 09:17:00 【WebCsDn_ TDCode】
index.html Add this code
fnResize()
window.onresize = function() {
fnResize()
}
function fnResize() {
var deviceWidth = document.documentElement.clientWidth || window.innerWidth
if (deviceWidth >= 750) {
deviceWidth = 750
}
if (deviceWidth <= 320) {
deviceWidth = 320
}
document.documentElement.style.fontSize = (deviceWidth / 7.5) + 'px'
}
according to UI 750 The proportion 100px = 1rem
边栏推荐
- 企业需要考虑的远程办公相关问题
- 876. intermediate node of linked list
- 自动化运维文章大合集
- Sword finger offer 18 Delete the node of the linked list
- 844. compare strings with backspace
- 【分享】企业如何进行施行规划?
- [scheme development] sphygmomanometer scheme pressure sensor sic160
- Openstack explanation (24) -- registration of neutron service
- 83. 删除排序链表中的重复元素
- [C language - Advanced pointer] mining deeper knowledge of pointer
猜你喜欢

Version mismatch between installed deeply lib and the required one by the script

Redis source code analysis hash object (z\u hash)

MSF给正常程序添加后门

MSF基于SMB的信息收集

OpenCV OAK-D-W广角相机测试

【新手上路常见问答】关于数据可视化

Blinn Phong reflection model

Runtimeerror: blobreader error:the version of imported blob doesn't match graph_ transformer

Pytorch installation for getting started with deep learning

MSF evasion模块的使用
随机推荐
MySQL启动报错“Bind on TCP/IP port: Address already in use”
[237. delete nodes in the linked list]
MySQL啟動報錯“Bind on TCP/IP port: Address already in use”
Shandong University project training (IV) -- wechat applet scans web QR code to realize web login
OpenCV OAK相机对比及介绍
面试题 17.10. 主要元素
报错[error] input tesnor exceeds available data range [NeuralNetwork(3)] [error] Input tensor ‘0‘ (0)
2161. 根据给定数字划分数组
C language printing heart
远程办公最佳实践及策略
shell脚本之sed详解 (sed命令 , sed -e , sed s/ new / old / ... )
Clothing ERP: how do enterprises carry out implementation planning?
从企业评价的方历来看ERP软件成功与失利
面试题 02.02. 返回倒数第 k 个节点
【芯片方案】红外人体测温仪方案设计
Output image is bigger (1228800b) than maximum frame size specified in properties (1048576b)
Machine learning notes - in depth Learning Skills Checklist
Success and failure of ERP software from the perspective of enterprise evaluation
kubelet Error getting node 问题求助
When the enterprise makes a decision, which part should lead the ERP project?