7
7
700ghz2016-04-04 12:48:31
css
700ghz, 2016-04-04 12:48:31

Page langing dimensions?

Typically, a landing page consists of slides, each of which is the size of a screen.
Example: https://rocketbank.ru/
In addition, such pages are also adaptive.

How is the size of one slide calculated? With CSS or JS? Maybe there is a jQuery library for such purposes?
What do you advise?

Thank you in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Cyber_bober, 2016-04-04
@700ghz

You can write a simple Js function that will calculate the height of the screen and assign it to a specific class

$(document).ready(function() {        
      $('.fullscreen').height($(window).height());    
      $(window).resize(function() {
        $('. fullscreen').height($(window).height());
      })
    });

then set the class for the required blocks and their height will be equal to the current size of the browser window
<div class="fullscreen">
</div>

S
Sergey Goryachev, 2016-04-04
@webirus

" vh and vw " google

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question