We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
很多时候我们使用overflow:hidden是为了隐藏溢出的内容
overflow:hidden
hidden在于内容可以以编程的方式滚动(例如,通过设置 scrollLeft 等属性的值或 scrollTo() 方法), 因此该元素仍然是一个滚动的容器。
hidden
除此之外,还有一个比较隐蔽的问题:overflow:hidden容器内在隐藏区域有可聚焦的元素或隐藏区域有一个元素被调用了scrollIntoView方法,那么浏览器依然会对这个overflow:hidden的容器进行滚动,尝试把聚焦或要展示的元素显示出来
scrollIntoView
如果确实要隐藏,不希望通过任意一种方式进行滚动,请使用overflow:clip
overflow:clip
The text was updated successfully, but these errors were encountered:
No branches or pull requests
很多时候我们使用
overflow:hidden
是为了隐藏溢出的内容hidden
在于内容可以以编程的方式滚动(例如,通过设置 scrollLeft 等属性的值或 scrollTo() 方法), 因此该元素仍然是一个滚动的容器。除此之外,还有一个比较隐蔽的问题:
overflow:hidden
容器内在隐藏区域有可聚焦的元素或隐藏区域有一个元素被调用了scrollIntoView
方法,那么浏览器依然会对这个overflow:hidden
的容器进行滚动,尝试把聚焦或要展示的元素显示出来如果确实要隐藏,不希望通过任意一种方式进行滚动,请使用
overflow:clip
The text was updated successfully, but these errors were encountered: