网站无法在手机中滚动的自适应设计 [英] responsive design for website not scrolling in Mobile phones
问题描述
我正在设计一个响应式网站.它在台式机上可以正常工作,但是当我在手机上进行测试时,我无法滚动页面.因此,我只能看到适合设备高度的内容.注意:我什至包括了meta name ="viewport" content ="width = device-width",initial-scale-1.0请帮助我:-)
I am designing a responsive website. It works fine in desktop but when i test in Mobile phones ,I am not able to scroll the page. So i can see only content which fit in the device height. Note: I have even included meta name="viewport" content="width=device-width",initial-scale-1.0" Please Help me :-)
推荐答案
问了这个问题已经一年了,但是我的回答可能会对某人有所帮助.
Its been a year since you asked this question, but my answer might help someone.
请确保您没有使用 body {溢出:隐藏}
,因为这将隐藏在初始屏幕中不可见的内容.
Make sure you haven't use body{ overflow: hidden}
, because that will hide content which is not visible in initial screen.
如果要隐藏由于未知原因而来的水平滚动,请使用 body {overflow-x:hidden}
.但是,我建议您查找水平滚动背后的原因.
If you want to hide horizontal scroll which is coming because of unknown reason, use body{overflow-x: hidden}
. However, I recommend you to find reason behind horizontal scroll.
这篇关于网站无法在手机中滚动的自适应设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!