
这是代码:
<head> <Meta charset="UTF-8"> <Title>Title</Title> <style> * { margin: 0; padding: 0; } h1 { wIDth: 100%; background: blue } </style></head><body><h1> Some header text here</h1>解决方法 以下是 here的引用: To attempt to provIDe the best experIEnce,mobile browsers render the
page at a desktop screen wIDth (usually about 980px,though this
varIEs across devices),and then try to make the content look better
by increasing Font sizes and scaling the content to fit the screen.
This means that Font sizes may appear inconsistent to users,who may
have to double-tap or pinch-to-zoom in order to see and interact with
the content.
这就是宽度不变的原因.浏览器只需缩小整个网页以适应屏幕.
Using the Meta vIEwport value wIDth=device-wIDth instructs the page to
match the screen’s wIDth in device-independent pixels.
这就是为什么它使用@R_404_6889@ =“vIEwport”标签调整宽度.
这似乎有效:
<Meta @R_404_6889@="vIEwport" content="wIDth=device-wIDth,initial-scale=1,shrink-to-fit=no">
有关更多信息,请阅读文档on viewport meta tag at MDN.:
总结The vIEwport Meta tag tells the browser that the wIDth of the screen should be consIDered the “Full WIDth” of the page. Meaning no matter the wIDth of the device you are on,whether on desktop or mobile. The website will follow the wIDth of the device the user is on.
以上是内存溢出为你收集整理的html – 即使我在Chrome调试工具中更改视口,为什么网站的宽度也相同?全部内容,希望文章能够帮你解决html – 即使我在Chrome调试工具中更改视口,为什么网站的宽度也相同?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)