javascript - What technique is used to create a div limited by the page fold? -
skipping discussion importance of fold in web design, i'd know technique used limit specific section (could div, example) on browser fold considering responsive design. websites use both mouse scroll , button slide section below.
ex.: next
my point not slide itself, how each section renders on fold regardless of monitor resolution.
you might try using css unit of measurement vh
. have div
want take half screen (viewport) this:
div{ height: 50vh; }
vh
stands "viewport height" , used percentage. have div take 100% of view-able area (viewport), regardless of screen size or resolution this: div { height: 100vh; }
Comments
Post a Comment