How to properly set the 100% DIV height to match document/window height?

前端 未结 9 1827
难免孤独
难免孤独 2021-01-30 04:53

I have a wrapper positioned to center with an y-repeated background image:


    
...some content
&
9条回答
  •  后悔当初
    2021-01-30 05:20

    Use #element{ height:100vh}

    This will set the height of the #element to 100% of viewport. Hope this helps.

提交回复
热议问题