Why is the body setting overflow: hidden invalid?

Why is the body setting overflow: hidden invalid?

</div>
</body>
Css
Jun.18,2022

html sets overflow:hidden


Porter
From the from the first such child element to the viewport, if the value on the root element is' visible'.

That is, overflow:hidden set on the body element, is moved to apply to the viewport instead. To avoid that happening, you can set the < html > element to not be overflow:visible.

i.e. Add html {overflow:auto;} to the CSS.
https://stackoverflow.com/que...

Menu