Why does height 100% work when DOCTYPE is removed?

前端 未结 5 1579
我寻月下人不归
我寻月下人不归 2020-11-22 05:25

This is the entire code:




    
5条回答
  •  生来不讨喜
    2020-11-22 05:53

    With the HTML5 doctype you need to also set the height on the html element:

    html {
        height:100%;
    }
    

提交回复
热议问题