Witam
Przychodzę do was z problemem, nad którym już trochę siedzę.
A mianowicie próbuje zrobić slider na stronie, który wyświetla się na 100% wyświetlacza.
Problem polega na tym, że w devtoolsach wszystko wygląda jak należy, zaś na telefonie już nie tak bardzo, a dokładniej przez pasek adresu strona jest dłuższa, i można przewijać w dół, a ja tego efektu chce uniknąć.
Tak to na tą chwile na telefonie wygląda:
A tak powinno wyglądać
slider.vue template
<div class="owlOverlay" v-if="images.length > 0">
<carousel class="main_carousel_container" :autoplay="false" :loop="true" :center="true" :items="1" :dotsContainer="'.dotsContainer'" :nav="false">
<div class="slider_item_wrapper" v-for="img in images" :key="img.id" :style="`background-image: ${img.style}, url(${img.url})`">
<div class="first"><h1 class="slider_heading">{{img.heading_text}}</h1></div>
<div class="second"><button class="slider_button">{{img.button_text}}</button></div>
</div>
</carousel>
<div class="dotsContainer"></div>
</div>
app.vue scss
html, body { height: 100% }
slider.vue scss
.owlOverlay, .owl-carousel, .owl-stage-outer, .owl-stage, .owl-item{
height: 100%;
// min-height: -webkit-fill-available
}
.main_carousel_container{
width: 100%;
height: 100%;
}
.slider_item_wrapper{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-size: cover !important;
background-position: center !important;
}
.slider_heading{
margin: 0 33px 0 34px;
font-size: 61px;
font-weight: bold;
line-height: 81.7%;
text-shadow: 0px 4px 12px rgba(0, 0, 0, 0.25);
color: white;
}
.slider_button{
background: none;
border: 2px solid white;
width: 160px;
height: 40px;
color: white;
text-transform: uppercase;
}
.first{
display: flex;
justify-content: center;
align-items: flex-end;
width: 100%;
height: 60%;
}
.second{
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 40%;
}
.dotsContainer{
width: 100%;
position: absolute;
bottom: 0;
left: 0;
z-index: 10;
display: flex;
justify-content: center;
button{
width: 12px;
height: 12px;
border: none;
margin: 6px;
border-radius: 20px;
&:focus{
outline: none;
}
}
.active{
background: white;
}
}