overflow-x: hidden, is not working in safari

谁说我不能喝 提交于 2019-12-31 06:42:04

问题


I have a site that works well on every browser, except on Safari. On safari I can scroll horizontally for many thousands of pixels.

Anyone have had this issue?


回答1:


I have seen your site, it seems that you haven't declared overflow-x: hidden for your html tag. Please do. It seems to solve the problem.




回答2:


Tried the answer supplied above but it didn't fix my issue so I'm leaving my research / fix here for any others looking for help in the future.

I read that apparently Safari overlooks overflow when rendering so you have to target the body better? I gave the body a class and input the code below and this has fixed my issue.

html, body {
	position:relative;
	overflow-x:hidden;
}

OR

html, .custom-body-class {
	position:relative;
	overflow-x:hidden;
}

Hope this helps someone...



来源:https://stackoverflow.com/questions/32666663/overflow-x-hidden-is-not-working-in-safari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!