From 7c396eb0bd077a5de7407a8d9775b03c95099e02 Mon Sep 17 00:00:00 2001 From: kazachilo Date: Mon, 17 Mar 2025 11:53:48 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=BF=D1=80=D0=BE=D0=B1=D0=BB=D0=B5=D0=BC=D1=8B?= =?UTF-8?q?=20=D1=81=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=D0=BC=20=D0=BD=D0=B0=20iPhone:=201)=20=D0=B2?= =?UTF-8?q?=D0=B5=D0=BB=D0=B8=D1=87=D0=B5=D0=BD=20z-index=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20ImageViewer,=20=D1=87=D1=82=D0=BE=D0=B1=D1=8B=20=D0=BE?= =?UTF-8?q?=D0=BD=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B0=D0=BB?= =?UTF-8?q?=D1=81=D1=8F=20=D0=BF=D0=BE=D0=B2=D0=B5=D1=80=D1=85=20=D1=85?= =?UTF-8?q?=D0=B5=D0=B4=D0=B5=D1=80=D0=B0=20=D0=B8=20=D1=84=D1=83=D1=82?= =?UTF-8?q?=D0=B5=D1=80=D0=B0;=202)=20=D1=80=D0=B5=D0=B4=D0=BE=D1=82=D0=B2?= =?UTF-8?q?=D1=80=D0=B0=D1=89=D0=B5=D0=BD=20=D0=BD=D0=B5=D0=B6=D0=B5=D0=BB?= =?UTF-8?q?=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D1=81=D0=BA?= =?UTF-8?q?=D1=80=D0=BE=D0=BB=D0=BB=D0=B8=D0=BD=D0=B3=20=D0=B2=D1=81=D0=B5?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=BA=D0=BE=D0=BD=D1=82=D0=B5=D0=B9=D0=BD=D0=B5?= =?UTF-8?q?=D1=80=D0=B0=20=D1=81=20=D0=BF=D0=BE=D0=BC=D0=BE=D1=89=D1=8C?= =?UTF-8?q?=D1=8E=20overscroll-behavior=20=D0=B8=20=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=D1=8C=D0=BD=D1=8B=D1=85=20=D0=BD=D0=B0=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=B5=D0=BA=20overflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/Layout.module.css | 2 ++ src/components/shared/ImageViewer.module.css | 4 ++-- src/index.css | 13 ++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/layout/Layout.module.css b/src/components/layout/Layout.module.css index 6d01028..ae120e3 100644 --- a/src/components/layout/Layout.module.css +++ b/src/components/layout/Layout.module.css @@ -8,6 +8,7 @@ overflow: hidden; position: relative; /* Добавляем относительное позиционирование */ height: 100%; /* Устанавливаем высоту 100% */ + overscroll-behavior: none; /* Предотвращает "резиновый" эффект на iOS */ } .main { @@ -18,6 +19,7 @@ overflow-y: auto; /* Разрешаем скроллинг только для основного контента */ -webkit-overflow-scrolling: touch; /* Улучшаем инерционный скроллинг на iOS */ padding-top: 0px; /* Уменьшаем отступ до 20px */ + overscroll-behavior: contain; /* Ограничивает эффект скролла только этим элементом */ } .container { diff --git a/src/components/shared/ImageViewer.module.css b/src/components/shared/ImageViewer.module.css index d808722..1f3af71 100644 --- a/src/components/shared/ImageViewer.module.css +++ b/src/components/shared/ImageViewer.module.css @@ -8,7 +8,7 @@ display: flex; justify-content: center; align-items: center; - z-index: 1000; + z-index: 9999; /* Значительно увеличиваем z-index, чтобы отображалось поверх хедера и футера */ } .content { @@ -42,7 +42,7 @@ display: flex; justify-content: center; align-items: center; - z-index: 1001; + z-index: 10000; /* Увеличиваем z-index еще больше, чтобы кнопка была поверх фона */ } /* Медиа-запрос для мобильных устройств */ diff --git a/src/index.css b/src/index.css index b884960..89b0cb5 100644 --- a/src/index.css +++ b/src/index.css @@ -29,7 +29,7 @@ #root { min-height: 100vh; background-color: var(--color-background); - overflow-y: auto; + overflow: hidden; /* Изменено с overflow-y: auto */ overflow-x: hidden; position: absolute; top: 0; @@ -41,6 +41,10 @@ /* Базовые стили */ html { -webkit-tap-highlight-color: transparent; + overflow: hidden; /* Изменено с overflow-y: scroll */ + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* IE and Edge */ + overscroll-behavior: none; /* Предотвращает "резиновый" эффект на iOS */ } body { @@ -65,12 +69,7 @@ body { -webkit-tap-highlight-color: transparent; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; -} - -html { - overflow-y: scroll; - scrollbar-width: none; /* Firefox */ - -ms-overflow-style: none; /* IE and Edge */ + overscroll-behavior: none; /* Предотвращает "резиновый" эффект на iOS */ } html::-webkit-scrollbar {