Кто-нибудь знает проблему?
HTML (начальный раздел и эффект горизонтальной прокрутки):
Код: Выделить всё
const scrollContainer = document.querySelector(".info");
scrollContainer.addEventListener("wheel", (evt) => {
evt.preventDefault();
scrollContainer.scrollLeft += evt.deltaY;
});Код: Выделить всё
.container {
color: white;
width: 100%;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
background: linear-gradient( rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.9)), url(../images/philly-map.jpeg);
background-size: cover;
background-position: center;
}
.container p {
font-size: 1.5em;
padding: 20px;
}
.container h1 {
font-size: 3em;
}
.animate {
color: white;
font-size: 5em;
animation: animate 2s ease-in infinite;
opacity: 1;
transform: translateY(3em);
}
@keyframes animate {
0% {
opacity: 1;
}
75% {
opacity: 0;
transform: translateY(4em);
}
99% {
opacity: 0;
transform: translateY(3em);
}
100% {
opacity: 1;
}
}
.info {
overflow-x: hidden;
display: flex;
}
h1 {
margin: 0;
padding: 0;
}
.content {
min-width: 100vw;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font-size: 4ch;
}
.content:nth-child(even) {
background-color: teal;
color: white;
}Код: Выделить всё
Learn Where
Lorem ipsum dolor sit amet consectetur adipisicing elit. Eaque saepe excepturi enim laboriosam velit quibusdam? Quisquam quo maxime doloribus, placeat repudiandae animi, similique praesentium amet, nostrum quam impedit tempora dignissimos.
[i][/i]
Replace
This
Text
Later
Если бы кто-нибудь мог добавить код, это очень помогло бы
Подробнее здесь: https://stackoverflow.com/questions/766 ... oll-effect
Мобильная версия