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

前端 未结 9 1838
难免孤独
难免孤独 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:01

    this is how i answered that

    
    

    css:

    #background{
    position:absolute;
    top:0;
    left:0;
    right:0;
    }
    

    so basically on every resizing event i will overwrite the height of the div in this case an image that i use as overlay for the background and have it with opacity not so colorful also i can tint it in my case with the background color.

    but thats another story

提交回复
热议问题