конкретная проблема: < /strong>
a React Components с эффектом прокрутки окна через существующее окно слева было реализовано с использованием синхронизированного перехода 3 дочерних элементов. As i understand, synchronization is not perfect so there is an effect of the existing window "shivering" while the left window is scrolling on it.
Desired behavior:
The existing windows should be stable while the left window scrolls over it.
Sample code that demonstrates the problem:
React Код: < /p>
const TestWindow = () => {
return (
What is Lorem Ipsum?
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text ever
since the 1500s, when an unknown printer took a galley of type and
scrambled it to make a type specimen book. It has survived not only
five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with
the release of Letraset sheets containing Lorem Ipsum passages, and
more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum.
Why do we use it?
It is a long established fact that a reader will be distracted by the
readable content of a page when looking at its layout. The point of
using Lorem Ipsum is that it has a more-or-less normal distribution of
letters, as opposed to using 'Content here, content here', making it
look like readable English. Many desktop publishing packages and web
page editors now use Lorem Ipsum as their default model text, and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy. Various versions have evolved over the years, sometimes by
accident, sometimes on purpose (injected humour and the like).
);
};
export default TestWindow;
< /code>
css:
< /p>
.test-window {
display: flex;
background-color: white;
--test-width: 50rem;
--left-width: 1rem;
width: var(--test-width);
max-width: 90vw;
border-radius: 8px;
}
.test-window:hover {
--left-width: 15rem;
}
.test-left-container,
.test-left,
.test-right {
transition: transform 0.3s, max-width 0.3s;
}
.test-left-container {
overflow: hidden;
max-width: var(--left-width);
}
.test-left {
width: var(--test-width);
transform: translateX(calc(var(--left-width) - 100%));
padding: 1rem;
border: 1px solid green;
}
.test-right-container {
flex: 1 1 auto;
overflow: hidden;
width: calc(100% - var(--left-width));
}
.test-right {
width: var(--test-width);
transform: translateX(calc(var(--left-width) * -1));
padding: 1rem;
border: 1px solid green;
}
< /code>
Идея состоит в том, чтобы перевести как левое окно (наложение), так и правое окно (существующий), поэтому всегда видно их правая сторона.
В примере кода прокрутка инициируется парящей над окном. />
thanks.
Подробнее здесь: https://stackoverflow.com/questions/797 ... er-another
Проблема синхронизации перехода при скольжении одного окна по другому ⇐ CSS
Разбираемся в CSS
1758893719
Anonymous
[b] конкретная проблема: < /strong>
a React Components с эффектом прокрутки окна через существующее окно слева было реализовано с использованием синхронизированного перехода 3 дочерних элементов. As i understand, synchronization is not perfect so there is an effect of the existing window "shivering" while the left window is scrolling on it.
Desired behavior:[/b]
The existing windows should be stable while the left window scrolls over it.
[b]Sample code that demonstrates the problem:[/b]
React Код: < /p>
const TestWindow = () => {
return (
What is Lorem Ipsum?
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text ever
since the 1500s, when an unknown printer took a galley of type and
scrambled it to make a type specimen book. It has survived not only
five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with
the release of Letraset sheets containing Lorem Ipsum passages, and
more recently with desktop publishing software like Aldus PageMaker
including versions of Lorem Ipsum.
Why do we use it?
It is a long established fact that a reader will be distracted by the
readable content of a page when looking at its layout. The point of
using Lorem Ipsum is that it has a more-or-less normal distribution of
letters, as opposed to using 'Content here, content here', making it
look like readable English. Many desktop publishing packages and web
page editors now use Lorem Ipsum as their default model text, and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy. Various versions have evolved over the years, sometimes by
accident, sometimes on purpose (injected humour and the like).
);
};
export default TestWindow;
< /code>
css:
< /p>
.test-window {
display: flex;
background-color: white;
--test-width: 50rem;
--left-width: 1rem;
width: var(--test-width);
max-width: 90vw;
border-radius: 8px;
}
.test-window:hover {
--left-width: 15rem;
}
.test-left-container,
.test-left,
.test-right {
transition: transform 0.3s, max-width 0.3s;
}
.test-left-container {
overflow: hidden;
max-width: var(--left-width);
}
.test-left {
width: var(--test-width);
transform: translateX(calc(var(--left-width) - 100%));
padding: 1rem;
border: 1px solid green;
}
.test-right-container {
flex: 1 1 auto;
overflow: hidden;
width: calc(100% - var(--left-width));
}
.test-right {
width: var(--test-width);
transform: translateX(calc(var(--left-width) * -1));
padding: 1rem;
border: 1px solid green;
}
< /code>
Идея состоит в том, чтобы перевести как левое окно (наложение), так и правое окно (существующий), поэтому всегда видно их правая сторона.
В примере кода прокрутка инициируется парящей над окном. />
thanks.
Подробнее здесь: [url]https://stackoverflow.com/questions/79765213/transition-synchronization-problem-while-sliding-one-window-over-another[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия