Making a div fit the initial screen

后端 未结 10 977
谎友^
谎友^ 2020-12-04 17:49

I want to make a div fit the initial height and width of a users screen.

I think the following crudely drawn diagram explain this better:

10条回答
  •  孤城傲影
    2020-12-04 18:38

    i think this is the easiest way... by letting the browser tell he height... using java script

    `

    
    
    viewport
    
    
     
     
      

    Test

    `

提交回复
热议问题