-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
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
[css] 第85天 怎么让body高度自适应屏幕?为什么? #593
Comments
html,body{height:100%} |
同楼上,html,body同时设置成100%才有效,html百分比是相对于浏览器而言的,其他元素相对于父元素。
|
body{ |
body{height:100%} |
@nowherebutup @dondonZh 只写body应该不行吧? |
100vh是可以的,在任何地方,100%的话需要从HTML开始。 |
不知道我理解对不对 为何只设置body{height:100%}不行? |
贤弟理解很到位。 |
DOM 元素的 另外也可以给 |
|
第85天 怎么让body高度自适应屏幕?为什么?
The text was updated successfully, but these errors were encountered: