S
S
Sayyflyy2015-10-01 15:37:22
css
Sayyflyy, 2015-10-01 15:37:22

How to make the start page full screen?

The site is rubbery and it is not clear how to make the initial page full screen as the final resolution is not known.
247b89cd10c345b48e5a4cc6b2f4b5a8.pngc9f74dbdc2c94fd5acc07a71432d25fd.png

Answer the question

In order to leave comments, you need to log in

6 answer(s)
U
ummahusla, 2015-10-01
@Antonoff

.class-wrap {
    min-height: 100vh;
    min-width: 100vw;
}

I
Ivanq, 2015-10-01
@Ivanq

Remove from img and put in background-image css

.class-wrap {
    background-image: src(myimage.png);
    background-size: cover;
    width: 100%;
    height: 100%;
    display: inline-block;
}

What is not clear, ask

D
Dmitry Novikov, 2015-10-01
@dmitriy_novikov

why is it unknown?
take jQuery $(window).width() and $(window).height() - and you will have the final resolution.

3
3luyka, 2015-10-01
@3luyka

With jQuery:

function fullScreenEl ()
{
       var windowHeight = $(window).height(); // получаем высоту окна.
       $('your_selector').css('height', windowHeight + 'px'); // устанавливаем высоту окна для определенного элемента. 
}

$(document).ready(fullScreenEl);
$(window).resize(fullScreenEl);

D
Dmitry Pyrkin, 2015-10-01
@ps1panda

height:100vh

A
Artem Matveev, 2015-10-02
@artemmatveev

Wrap the content displayed in full screen:

<div class="full-screen">
</div>

Then:
function alturaMaxima() {
    var altura = $(window).height();
    $(".full-screen").css('min-height', altura);
}

$(document).ready(function () {
    alturaMaxima();
    $(window).bind('resize', alturaMaxima);
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question