How to get an element the same height as browser resolution?

后端 未结 5 1738
误落风尘
误落风尘 2021-01-27 14:59

I am trying use jquery to set the height of an element to equal the users browser. Here is the code I got so far that\'s not working. Is it because I have a minimal height set

5条回答
  •  深忆病人
    2021-01-27 15:29

    To set 'element' height the height of the window you need to.

    $('element').height($(window).height());
    

提交回复
热议问题