Full viewport height scaling div just css no js… Possible?

后端 未结 3 1727
旧巷少年郎
旧巷少年郎 2021-02-02 12:55

Ok, I\'m trying to get a div to scale and the height is always the height of the viewport. I\'m going to link to my examples as it needs some explaining.

www.madmediabli

3条回答
  •  萌比男神i
    2021-02-02 13:35

    Please see this: http://stanhub.com/how-to-make-div-element-100-height-of-browser-window-using-css-only/

    your content on screen 1
    your content on screen 2
    div#welcome { height: 100vh; background: black; } div#projects { height: 100vh; background: yellow; }

    That's it.

提交回复
热议问题