HTML 正文未在移动设备上填充完整宽度 [英] HTML body not filling complete width on mobile devices
问题描述
如果我在普通浏览器中打开我的 (GWT) 页面,一切正常.正文占据整个宽度,内容很好地居中.但是,如果我在手机上尝试此操作,则主体不会占据整个宽度,因此内容不会居中.
If I open my (GWT) page in a normal browser, everything works fine. The body takes the whole width and the content is nicely centered. But if I try this on a mobile phone, the body does not take the whole width and therefore the content is not centered.
我不知道为什么它会这样显示.此外,将 100% 宽度添加到 body 和 html 标签并不能解决问题.
I couldn't find out why it is being displayed like this. Also, adding 100% width to body and html tag does not solve the issue .
有没有办法让它在移动设备上很好地工作?
Is there a way to get this working nicely on a mobile device?
该页面可以通过以下方式访问:http://www.vegantastic.de/
The page can be reached under: http://www.vegantastic.de/
推荐答案
这让我发疯了,我只是通过在正文中添加 position:fixed
来解决它
this was driving me crazy and i just solved it by adding position:fixed
to the body
这篇关于HTML 正文未在移动设备上填充完整宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!