How can I stretch a div to 100% page height?

前端 未结 10 1277
一生所求
一生所求 2021-02-06 17:56

    
        

        

    
        
10条回答
  •  伪装坚强ぢ
    2021-02-06 18:32

    Applying

    html, body, .100PercentHeight{
        height:100%;
    }
    

    should yield the effect you're looking for. You need it on all three.

    However, it often doesn't actually do what you think it might, and can be problematic. Faux-column techniques or "sticky footers" tend to work better.

提交回复
热议问题