您的位置:首页技术文章
文章详情页

css - 网页宽高固定且大于浏览器(react)

【字号: 日期:2023-10-02 15:29:32浏览:93作者:猪猪

问题描述

把网页放入react框架后,打开html文件,并切换到chrome 的 devtool编辑页面,宽高就固定,而且是比手机屏幕大好几倍。在非devtool下则,不会发生这个现象。css - 网页宽高固定且大于浏览器(react)

问题解答

回答1:

试着在 <head> 里面加上:

<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'>

标签: CSS
相关文章: