How can I make a div 100% of window height?

后端 未结 5 1695
醉酒成梦
醉酒成梦 2020-12-05 10:57

I just want to have a sidebar that will be 100% of window height, but nothing works except this:

#sidebarBack {
background: rgba(20, 20, 20, .3);
position: f         


        
5条回答
  •  遥遥无期
    2020-12-05 11:16

    Try the following

    #sidebarBack {
     background: rgba(20, 20, 20, .3);
     position: fixed;
     width: 250px;
     top:0;
     bottom:0;
     left: 0;
    }
    

提交回复
热议问题