Does the “overflow-y: scroll” property help prevent horizontal shift in Opera/Safari?

南笙酒味 提交于 2019-12-05 20:38:18

The CSS rule overflow-y: scroll works for me in:

  • Opera 10.10
  • Google Chrome 3.0.195.38
  • Mozilla Firefox 3.5.6

and obviously all versions of Microsoft Internet Explorer where the scrollbar is always shown.

Safari and Google Chrome are using the same view engine, so chances are it works in Safari as well :)

This:

body {
  overflow-y: scroll;
}

works in Opera 11.01 and Safari 5.0.3 for Windows, but this:

html {
  overflow-y: scroll;
}

doesn't work in Opera and works for the rest.

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