问题
Im using overflow:hidden to hide my unglam div in my webpage, it works well in all web browser but not in mobile browser. Anyone can help?
body
{
margin: auto;
display:block;
overflow-x:hidden;
overflow-y:hidden;
height:800px;
}
回答1:
Try adding following line in your html
<meta name="viewport" content="width=device-width, height=device-height">
and test on your phone. Maybe this should help.
回答2:
Add a wrapper inside your body tag and apply the overflow-x: hidden to that wrapper
回答3:
Depending on which mobile browser you're using, overflow-x and overflow-y may not be supported. Use overflow: hidden instead to cover all bases and be cross browser compatible.
来源:https://stackoverflow.com/questions/18268300/overflowhidden-not-working-on-mobile-browser