Анимация не сбрасывает кадр на 0Html

Программисты Html
Ответить
Anonymous
 Анимация не сбрасывает кадр на 0

Сообщение Anonymous »

У меня есть простой календарь, показывающий 2 последних месяца 2025 + 12 месяцев 2026 + 2 первых месяца 2027 года.
Существуют анимированные DOV, покрывающие/раскрывающие следующее изображение. Each frame lasts 5 seconds.
It works fine until I reach the last image.
Then the animation "freezes" and repeats twice the last image (frame 16), then moves back to 3rd image (frame 3).
I have try and modified the total time of the animation, but can't find my mistake(s).

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

html, body {
width: 100vw;
height: 100vh;
overflow: hidden;
}

/*
background: #c696eb;
background: linear-gradient(270deg,rgba(198, 150, 235, 1) 0%, rgba(253, 29, 29, 1) 50%, rgba(252, 176, 69, 1) 100%);
*/

/*-- ROTATE HUE --*/

@-webkit-keyframes rotateHue {
0% {
filter: hue-rotate(0deg);
}
20% {
filter: hue-rotate(10deg);
}
25% {
filter: hue-rotate(20deg);
}
45% {
filter: hue-rotate(30deg);
}
50% {
filter: hue-rotate(40deg);
}
70% {
filter: hue-rotate(-30deg);
}
75% {
filter: hue-rotate(-20deg);
}
95% {
filter: hue-rotate(-10deg);
}
100% {
filter: hue-rotate(0deg);
}
}

@keyframes rotateHue {
0% {
filter: hue-rotate(0deg);
}
20% {
filter: hue-rotate(10deg);
}
25% {
filter: hue-rotate(20deg);
}
45% {
filter: hue-rotate(30deg);
}
50% {
filter: hue-rotate(40deg);
}
70% {
filter: hue-rotate(-30deg);
}
75% {
filter: hue-rotate(-20deg);
}
95% {
filter: hue-rotate(-10deg);
}
100% {
filter: hue-rotate(0deg);
}
}

/*-- ROTATE FRAMES --*/

@-webkit-keyframes rotateFrame {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(180deg);
}
}

@keyframes rotateFrame {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(180deg);
}
}

/*-- OPEN TOP --*/

@-webkit-keyframes openTop {
0% {
transform: translate3d(-50%, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.8, 0, 0.1, 1);
animation-timing-function: cubic-bezier(0.8, 0, 0.1, 1);
}
40% {
transform: translate3d(-50%, -65vmax, 0);
animation-timing-functon: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
70% {
transform: translate3d(-50%, -65vmax, 0);
animation-timing-functon: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
100% {
transform: translate3d(-50%, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.335);
animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
}

@keyframes openTop {
0% {
transform: translate3d(-50%, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.8, 0, 0.1, 1);
animation-timing-function: cubic-bezier(0.8, 0, 0.1, 1);
}
40% {
transform: translate3d(-50%, -65vmax, 0);
animation-timing-functon: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
70% {
transform: translate3d(-50%, -65vmax, 0);
animation-timing-functon: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
100% {
transform: translate3d(-50%, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.335);
animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
}

/*-- OPEN BOTTOM --*/

@-webkit-keyframes openBottom {
0% {
transform: translate3d(-50%, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.8, 0, 0.1, 1);
animation-timing-function: cubic-bezier(0.8, 0, 0.1, 1);
}
40% {
transform: translate3d(-50%, 65vmax, 0);
animation-timing-functon: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
70% {
transform: translate3d(-50%, 65vmax, 0);
animation-timing-functon: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
100% {
transform: translate3d(-50%, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.335);
animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
}

@keyframes openBottom {
0% {
transform: translate3d(-50%, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.8, 0, 0.1, 1);
animation-timing-function: cubic-bezier(0.8, 0, 0.1, 1);
}
40% {
transform: translate3d(-50%, 65vmax, 0);
animation-timing-functon:  cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
70% {
transform: translate3d(-50%, 65vmax, 0);
animation-timing-functon: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
100% {
transform: translate3d(-50%, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.335);
animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.335);
}
}

/*-- SHOW-HIDE SLIDE --*/

@-webkit-keyframes showHideSlide {
0% {
opacity: 1;
pointer-events: auto;
z-index: 1;
}
25% {
opacity: 0;
pointer-events: none;
z-index: -1;
}
100% {
opacity: 0;
pointer-events: none;
z-index: -1;
}
}

@keyframes showHideSlide {
0% {
opacity: 1;
pointer-events: none;
z-index: 1;
}
25% {
opacity: 0;
pointer-events: none;
z-index: -1;
}
100% {
opacity: 0;
pointer-events: none;
z-index: -1;
}
}

/*-- BG IN/OUT --*/

@-webkit-keyframes bgInOut {
0% {
transform: rotate(-45deg) scale(1.1);
-webkit-animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
}
33% {
transform: rotate(0deg);
}
50% {
transform: rotate(0deg);
}
66% {
transform: rotate(0deg);
-webkit-animation-timing-function: cubic-bezier(0.895, 0.03, 0.685, 0.22);
animation-timing-function: cubic-bezier(0.895, 0.03, 0.685, 0.22);
}
100% {
transform: rotate(45deg) scale(0.9);
}
}

@keyframes bgInOut {
0% {
transform: rotate(-45deg) scale(1.1);
-webkit-animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
}
33% {
transform: rotate(0deg);
}
50% {
transform: rotate(0deg);
}
66% {
transform: rotate(0deg);
-webkit-animation-timing-function: cubic-bezier(0.895, 0.03, 0.685, 0.22);
animation-timing-function: cubic-bezier(0.895, 0.03, 0.685, 0.22);
}
100% {
transform: rotate(45deg) scale(0.9);
}
}

/*-- DIVs --*/

.untitled {
position: absolute;
height: 100%;
width: 100%;
-webkit-animation: rotateHue 75s linear infinite;
animation: rotateHue 75s linear infinite;
-webkit-animation-delay: 0.625s;
animation-delay: 0.625s;
}

.untitled__shutters {
position: absolute;
height: 150vmax;
width: 150vmax;
left: calc(50% - 75vmax);
top: calc(50% - 75vmax);
pointer-events: none;
z-index: 2;
-webkit-animation: rotateFrame 10s linear infinite;
animation: rotateFrame 10s linear infinite;
}

.untitled__shutters:before, .untitled__shutters:after {
content: "";
position: absolute;
height: 100%;
width: 100%;
left: 50%;
transform: translate3d(-50%, 0, 0);
background-color: #ee6116;
pointer-events: auto;
}

.untitled__shutters:before {
bottom: 50%;
-webkit-animation: openTop 5s infinite;
animation: openTop 5s infinite;
}

.untitled__shutters:after {
top: 50%;
-webkit-animation: openBottom 5s infinite;
animation: openBottom 5s infinite;
}

.untitled__slides {
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
background-color: #ee6116;
}

.untitled__slide {
position: absolute;
height: 100%;
width: 100%;
opacity: 0;
-webkit-animation: showHideSlide infinite 75s steps(1);
animation: showHideSlide infinite 75s steps(1);
}

/*-- SLIDES --*/

/*-- #1 --*/

.untitled__slide:nth-child(1) {
-webkit-animation-delay: 0s;
animation-delay: 0s;
}
.untitled__slide:nth-child(1) .untitled__slideBg {
background-image: url('img/calendar/0001.jpg');
}

/*-- #2 --*/

.untitled__slide:nth-child(2) {
-webkit-animation-delay: 5s;
animation-delay: 5s;
}
.untitled__slide:nth-child(2) .untitled__slideBg {
background-image: url('img/calendar/0002.jpg');
}

/*-- #3 --*/

.untitled__slide:nth-child(3) {
-webkit-animation-delay: 10s;
animation-delay:  10s;
}
.untitled__slide:nth-child(3) .untitled__slideBg {
background-image: url('img/calendar/0003.jpg');
}

/*-- #4 --*/

.untitled__slide:nth-child(4) {
-webkit-animation-delay: 15s;
animation-delay: 15s;
}
.untitled__slide:nth-child(4) .untitled__slideBg {
background-image: url('img/calendar/0004.jpg');
}

/*-- #5 --*/

.untitled__slide:nth-child(5) {
-webkit-animation-delay: 20s;
animation-delay: 20s;
}
.untitled__slide:nth-child(5) .untitled__slideBg {
background-image: url('img/calendar/0005.jpg');
}

/*-- #6 --*/

.untitled__slide:nth-child(6) {
-webkit-animation-delay: 25s;
animation-delay: 25s;
}
.untitled__slide:nth-child(6) .untitled__slideBg {
background-image: url('img/calendar/0006.jpg');
}

/*-- #7 --*/

.untitled__slide:nth-child(7) {
-webkit-animation-delay: 30s;
animation-delay: 30s;
}
.untitled__slide:nth-child(7) .untitled__slideBg {
background-image: url('img/calendar/0007.jpg');
}

/*-- #8 --*/

.untitled__slide:nth-child(8) {
-webkit-animation-delay: 35s;
animation-delay: 35s;
}
.untitled__slide:nth-child(8) .untitled__slideBg {
background-image: url('img/calendar/0008.jpg');
}

/*-- #9 --*/

.untitled__slide:nth-child(9) {
-webkit-animation-delay: 40s;
animation-delay: 40s;
}
.untitled__slide:nth-child(9) .untitled__slideBg {
background-image: url('img/calendar/0009.jpg');
}

/*-- #10 --*/

.untitled__slide:nth-child(10) {
-webkit-animation-delay: 45s;
animation-delay: 45s;
}
.untitled__slide:nth-child(10) .untitled__slideBg {
background-image: url('img/calendar/00010.jpg');
}

/*-- #11 --*/

.untitled__slide:nth-child(11) {
-webkit-animation-delay: 50s;
animation-delay: 50s;
}
.untitled__slide:nth-child(11) .untitled__slideBg {
background-image: url('img/calendar/00011.jpg');
}

/*-- #12 --*/

.untitled__slide:nth-child(12) {
-webkit-animation-delay: 55s;
animation-delay: 55s;
}
.untitled__slide:nth-child(12) .untitled__slideBg {
background-image: url('img/calendar/00012.jpg');
}

/*-- #13 --*/

.untitled__slide:nth-child(13) {
-webkit-animation-delay: 60s;
animation-delay: 60s;
}
.untitled__slide:nth-child(13) .untitled__slideBg {
background-image: url('img/calendar/00013.jpg');
}

/*-- #14 --*/

.untitled__slide:nth-child(14) {
-webkit-animation-delay: 65s;
animation-delay: 65s;
}
.untitled__slide:nth-child(14) .untitled__slideBg {
background-image: url('img/calendar/00014.jpg');
}

/*-- #15 --*/

.untitled__slide:nth-child(15) {
-webkit-animation-delay: 70s;
animation-delay: 70s;
}
.untitled__slide:nth-child(15) .untitled__slideBg {
background-image: url('img/calendar/00015.jpg');
}

/*-- #16 --*/

.untitled__slide:nth-child(16) {
-webkit-animation-delay: 75s;
animation-delay: 75s;
}
.untitled__slide:nth-child(16) .untitled__slideBg {
background-image: url('img/calendar/00016.jpg');
}

/*-- background --*/

.untitled__slideBg {
position: relative;
height: 100%;
width: 100%;
top: 0;
left: 0;
background-size: cover;
background-position: center;
background-color: #ee6116;
background-blend-mode: hard-light;
opacity: 1;
z-index: -1;
-webkit-animation: bgInOut 5s infinite;
animation: bgInOut 5s infinite;
}

.untitled__slideContent {
position: absolute;
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
color: white;
font-family: "righteous", sans-serif;
line-height: 0.8;
letter-spacing: -0.025em;
z-index: 2;
opacity: 1;
text-shadow: 0 0 0.5em rgba(179, 64, 26, 0.25);
mix-blend-mode: lighten;
}

.untitled__slideContent span {
display: block;
font-size: 15vmin;
}

.button {
font-family: "monoton", sans-serif;
text-decoration: none;
font-weight: 800;
text-transform: uppercase;
font-size: 2vmin;
display: inline-block;
position: relative;
border: 3px solid white;
box-shadow: -0.5vmin 0.5vmin 0 rgba(255, 255, 255, 0.5);
background: transparent;
margin-top: 5vmin;
mix-blend-mode: lighten;
color:  white;
padding: 2vmin 2vmin 1.8vmin 2vmin;
letter-spacing: 0.1em;
text-shadow: none;
line-height: 1;
transform: translate3d(0.5vmin, -0.5vmin, 0);
transition: all 100ms linear;
}

.button:hover {
transform: translate3d(1vmin, -1vmin, 0);
box-shadow: -1vmin 1vmin 0 rgba(255, 255, 255, 0.5);
background: white;
color: black;
}

.button:active {
transform: translate3d(0px, 0px, 0);
box-shadow: 0px 0px 0 rgba(255, 255, 255, 0.5);
}< /code>





My Calendar
November 2025
[url=#]xxxxx[/url]





My Calendar
December 2025
[url=#]xxxxx[/url]





My Calendar
January 2026
[url=#]xxxxx[/url]





My Calendar
February 2026
[url=#]xxxxx[/url]





My Calendar
March 2026
[url=#]xxxxx[/url]





My Calendar
April 2026
[url=#]xxxxx[/url]





My Calendar
May 2026
[url=#]xxxxx[/url]





My Calendar
June 2026
[url=#]xxxxx[/url]





My Calendar
July 2026
[url=#]xxxxx[/url]





My Calendar
August 2026
[url=#]xxxxx[/url]





My Calendar
September 2026
[url=#]xxxxx[/url]





My Calendar
October 2026
[url=#]xxxxx[/url]





My Calendar
November 2026
[url=#]xxxxx[/url]





My Calendar
December 2026
[url=#]xxxxx[/url]





My Calendar
January 2027
[url=#]xxxxx[/url]





My Calendar
February 2027
[url=#]xxxxx[/url]







Подробнее здесь: https://stackoverflow.com/questions/797 ... frame-to-0
Ответить

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

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

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

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

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