Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
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;
}
why is it unknown?
take jQuery $(window).width() and $(window).height() - and you will have the final resolution.
With jQuery:
function fullScreenEl ()
{
var windowHeight = $(window).height(); // получаем высоту окна.
$('your_selector').css('height', windowHeight + 'px'); // устанавливаем высоту окна для определенного элемента.
}
$(document).ready(fullScreenEl);
$(window).resize(fullScreenEl);
Wrap the content displayed in full screen:
<div class="full-screen">
</div>
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 questionAsk a Question
731 491 924 answers to any question