2 pièce(s) jointe(s)
header fige dans le viewport
BOnsoir
Sur ma page web j'ai un header qui couvre entièrement le viewport et se présente comme suit
(dans le fond j'ai une vidéo)
Pièce jointe 637394
Pièce jointe 637395
Le soucis est que lorsque j'ajoute du locomotive scroll sur ma page mon header se fige rendant le scroll impossible.
concrètement il est impossible de voir le contenu en dessous .
mon code html:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331
| <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="locomotive-scroll.css">
<link rel="icon" href="asset/img/burg.ico">
<title>Document</title>
</head>
<body data-scroll-container>
<header class="hero">
<h1> <span class="title">chez </span> med</h1>
<video class="video-bg" src="asset/cheeseburger.mp4" autoplay muted loop></video>
</header>
<main class="container">
<div class="menu">
<nav>
<ul>
<li><a href="#">burger</a></li>
<li><a href="#">sandwich</a></li>
<li><a href="#">shawarma</a></li>
<li><a href="#">salades</a></li>
<li> <a href="#">bbq</a></li>
<li><a href="#">boissons</a></li>
</ul>
</nav>
</div>
<div class="burger">
<div class="title1">
<span>00 — burger</span>
</div>
<div class="grille1">
<figure class="pic1 im">
<img src="asset/img/burger0.jpg" alt="hamburger">
<figcaption>burger</figcaption>
</figure>
<figure class="pic2 im">
<img src="asset/img/chicken.jpg" alt="chicken burger">
<figcaption>chichen burger</figcaption>
</figure>
<figure class="pic3 im">
<img src="asset/img/fish.jpg" alt="fish burger">
<figcaption>fish burger</figcaption>
</figure>
<figure class="pic4 im">
<img src="asset/img/big.jpg" alt="big burger">
<figcaption>big burger</figcaption>
</figure>
<figure class="pic5 im">
<img src="asset/img/double.jpg" alt="double">
<figcaption>double</figcaption>
</figure>
<figure class="pic6 im">
<img src="asset/img/cheese.jpg" alt="cheese">
<figcaption>cheese burger</figcaption>
</figure>
</div>
</div>
<div class="fond">
</div>
<div class="sandwich">
<div class="title2">
<span> 01 — sandwich</span>
</div>
<div class="grille2">
<figure class="pic01 mi">
<img src="asset/img/panini.jpg" alt="panini">
<figcaption>Panini</figcaption>
</figure>
<figure class="pic02 mi">
<img src="asset/img/fahita.jpg" alt="fahita">
<figcaption>fahita</figcaption>
</figure>
<figure class="pic03 mi">
<img src="asset/img/phila.jpg" alt="phila">
<figcaption>philadelphia</figcaption>
</figure>
<figure class="pic04 mi">
<img src="asset/img/wrapper.jpg" alt="wrapper">
<figcaption>wrapper</figcaption>
</figure>
</div>
</div>
<div class="texteDefilant">
<p class="textone" data-scroll data-scroll-speed="1">Découvrez </p>
<p class="texttwo" data-scroll data-scroll-speed="2">des saveurs</p>
<p class="texthree" data-scroll data-scroll-speed="3">exquises</p>
</div>
<div class="shawarma">
<div class="title3">
<span> 02 — shawarma</span>
</div>
<div class="grille3">
<figure class="shawarma01 n0">
<img src="asset/img/shawa-m.jpg" alt="shawarma mixte">
<figcaption>shawarma mixte</figcaption>
</figure>
<figure class="shawarma02 n0">
<img src="asset/img/chawarma.jpg" alt="shawarma">
<figcaption>shawarma</figcaption>
</figure>
</div>
</div>
<div class="enseigne" data-scroll-section>
<h2>
<span data-scroll data-scroll-repeat data-scroll-speed="2">c</span>
<span data-scroll data-scroll-repeat data-scroll-speed="3">h</span>
<span data-scroll data-scroll-repeat data-scroll-speed="4">e</span>
<span data-scroll data-scroll-repeat data-scroll-speed="5">z</span>
<span> </span>
<span data-scroll data-scroll-repeat data-scroll-speed="6">m</span>
<span data-scroll data-scroll-repeat data-scroll-speed="7">e</span>
<span data-scroll data-scroll-repeat data-scroll-speed="9">d</span>
</h2>
</div>
<div class="salades">
<div class="title4">
<span> 03 — salades</span>
</div>
<div class="grille4">
<figure class="pic10 s0">
<img src="asset/img/salade-cesar.jpg" alt="salade-cesar">
<figcaption>salade-cesar</figcaption>
</figure>
<figure class="pic11 s0">
<img src="asset/img/salade-greque.jpg" alt="salade-greque">
<figcaption>salade-greque</figcaption>
</figure>
<figure class="pic12 s0">
<img src="asset/img/salade-landaise.jpg" alt="salade-landaise">
<figcaption>salade-landaise</figcaption>
</figure>
<figure class="pic13 s0">
<img src="asset/img/Salade-nicoise.jpg" alt="Salade-nicoise">
<figcaption>salade-landaise</figcaption>
</figure>
<figure class="pic14 s0">
<img src="asset/img/salade-océane.jpg" alt="salade-océane">
<figcaption>salade-océane</figcaption>
</figure>
<figure class="pic15 s0">
<img src="asset/img/salade-parisienne.jpg" alt="salade-parisienne">
<figcaption>salade-parisienne</figcaption>
</figure>
<figure class="pic16 s0">
<img src="asset/img/Salade_comtoise.jpg" alt="Salade_comtoise">
<figcaption>Salade_comtoise</figcaption>
</figure>
<figure class="pic17 s0">
<img src="asset/img/auvergnate.jpg" alt="salade auvergnate">
<figcaption>salade auvergnate</figcaption>
</figure>
</div>
</div>
<div class="bbq">
<div class="title5">
<span> 04 — bbq</span>
</div>
<div class="grille5">
<figure class="pic20 bb">
<img src="asset/img/bbq.jpg" alt="borchette">
<figcaption>brochette</figcaption>
</figure>
<figure class="pic21 bb">
<img src="asset/img/meat.jpg" alt="viande de boeuf">
<figcaption>viande de boeuf</figcaption>
</figure>
</div>
</div>
<div class="boissons">
<div class="title6">
<span> 05 — boissons</span>
</div>
<div class="grille6">
<figure class="pic30 ww">
<img src="asset/img/Agua-Fresca.jpg" alt="agua fresca">
<figcaption>Agua-Fresca</figcaption>
</figure>
<figure class="pic31 ww">
<img src="asset/img/citronnade.jpg" alt="citronnade">
<figcaption>citronnade</figcaption>
</figure>
<figure class="pic32 ww">
<img src="asset/img/cocktail-de-fruit.jpg" alt="cocktail de fruit">
<figcaption>cocktail de fruit</figcaption>
</figure>
<figure class="pic33 ww">
<img src="asset/img/Mojito.jpg" alt="mojito">
<figcaption>mojito</figcaption>
</figure>
</div>
</div>
<div class="text">
<p class="pied"><span class="text1">Chez</span>MED</p>
</div>
</main>
<footer>
<p>© copyright <span id="med">chez med</span> tous droits réservées</p>
<p>
<span> <img class="localisation" src="asset/img/loc.png" alt="localisation"> 5462 Boulevard LABARRE</span>
</p>
</footer>
<!-- script locomotiveScroll-->
<script src="locomotive-scroll.min.js"></script>
<script>
const scroll = new LocomotiveScroll({
el: document.querySelector('[data-scroll-container]'),
smooth: true
});
</script>
</body>
</html> |
mon css
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
| .hero{
font-family:'scto_grotesk_alight' ;
/* background-color: grey;*/
background:rgb(0,0,0,0.5) ;
display: flex;
justify-content: center;
text-align: center;
position: relative;
overflow: hidden;
min-height: 100vh;
}
.video-bg{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
min-width: 100%;
min-height: 100%;
z-index: -1;
}
.container{
background-color: white;
min-height: 100vh;
position: relative;
overflow: hidden;
}
body{
background-color: white;
}
.title{
display: block;
}
.hero h1{
font-size: 12em;
text-transform:capitalize;
padding-top: 21px;
letter-spacing: 2px;
position: relative;
-webkit-text-stroke: 1px black;
color: transparent;
}
/*
==========================
premiere grille
==========================
*/
.burger{
width: 90%;
height: 1900px;
display: flex;
justify-content: space-around;
margin: 45px auto;
padding: 15px;
}
.grille1{
width: 80%;
height: 1820px;
display: grid;
grid-template-areas:"premiere . troisieme"
"deuxieme . troisieme"
" . . troisieme"
" . . . "
"quatrieme . sixieme"
"cinquieme . sixieme"
" . . sixieme";
row-gap: 29px;
margin: 25px auto;
position: relative;
}
.pic1,.pic2,.pic4,.pic6{
width:400px;
height: 400px;
}
.pic3,.pic5{
width:450px;
height:700px;
}
.pic1{
grid-area: premiere;
}
.pic2{
grid-area: deuxieme;
}
.pic3{
grid-area: troisieme;
}
.pic4{
grid-area: quatrieme;
}
.pic6{
grid-area:cinquieme;
}
.pic5{
grid-area: sixieme;
}
figure{
text-align: center;
margin-bottom: 10px;
}
figure img{
object-fit:cover;
width: 100%;
height: 100%;
}
img{
max-width: 100%;
height: auto;
}
figcaption{
margin:5px;
font-family:'scto_grotesk_alight';
text-transform: capitalize;
color: #000;
font-weight: bold;
font-size: 1.5em;
}
.title1{
font-family: 'scto_grotesk_alight' ;
text-transform: uppercase;
font-weight: bold;
font-size: 1.5em;
position:relative;
}
.fond{
background-image: url('i-like-food.svg');
width: 100%;
height: 250px;
}
.title1::after {
content:"";
position:absolute;
width: 100%;
height:2px;
background-color: black;
display: block;
} |
Merci d'avance pour d'éventuel réponse.