Привязка прокрутки не работает при прокрутке двумя пальцами на сенсорной панели.CSS

Разбираемся в CSS
Ответить
Anonymous
 Привязка прокрутки не работает при прокрутке двумя пальцами на сенсорной панели.

Сообщение Anonymous »

Я пытаюсь реализовать на своем веб-сайте эффект привязки прокрутки, чтобы каждый раздел фиксировался при прокрутке пользователем. Он отлично работает, когда я использую колесо прокрутки мыши (срабатывает от 1 раза до 5...), но не работает стабильно, когда я использую прокрутку двумя пальцами на сенсорной панели. Вместо привязки к следующему разделу страница плавно прокручивается, минуя эффект привязки.

Код: Выделить всё





Contact
Resume
About
Certificate
Project




[img]./public/ICON.png[/img]








Hey 👋
I'm MisTrale 🦅
FullStack Developer Engineer

I want to be a  Full-Stack  Developer specializing in front-end, back-end, and  mobile  development using Flutter.
I am passionate about creating seamless and efficient applications that provide real value.
Actively seeking opportunities to leverage my skills in meaningful projects and contribute to the growth of the tech industry.







ABOUT ME




NotMe


И мой CSS:

Код: Выделить всё

body {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
height: 100vh;
min-height: 100vh;
overflow: hidden;
scroll-behavior: smooth;

color-scheme: light dark;
background-image: radial-gradient(at center, #0d1d31 0%, #0c0d13 100%);

font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.scroll-container {
height: 100vh; /* Full viewport height for the container */
overflow-y: scroll; /* Enables vertical scrolling */
scroll-snap-type: y mandatory; /* Each section snaps to the viewport */
-ms-overflow-style: none; /* Hides scrollbar on Internet Explorer and Edge */
-webkit-overflow-scrolling: touch; /* Enables momentum scrolling on iOS */
scrollbar-width: none; /* Hides scrollbar on Firefox */
}

.step {
height: 100vh; /* Full viewport height for each section */
scroll-snap-align: start; /* Each section snaps to the start */
}

/* Hide scroll bar specifically for the container */
.scroll-container::-webkit-scrollbar {
display: none; /* Hides scrollbar on WebKit browsers */
}
Спасибо! ;)


Подробнее здесь: https://stackoverflow.com/questions/791 ... y-touchpad
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «CSS»