Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
201 changes: 201 additions & 0 deletions src/ex10_html-css-advanced/task-01.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
/* сбрасываем дефолтные внешние отступы */
body {
margin: 0;
}
/* флекс-контейнер для всего задания */
.app {
display: flex;
flex-flow: column nowrap;
justify-content: space-around;
align-items: center;
padding-top: 20px;
padding-bottom: 20px;
background-color: #585f63;
}
/* разметка блоков для всех 3-ех анимаций */
.loader-wrapper,
.ball-wrapper,
.animation-wrapper {
position: relative;
display: flex;
flex-flow: row nowrap;
justify-content: center;
align-items: center;
margin: 20px;
width: 80%;
height: 400px;
}

.loader-wrapper {
flex-flow: column nowrap;
}

.loader-wrapper__loader:hover,
.middle-block__:hover,
.animation-wrapper__infinity-animation:hover {
cursor: pointer;
}

/* Первая анимация */
.loader-wrapper__loader {
display: flex;
justify-content: space-between;
align-items: center;
height: 100px;
width: 100px;
padding: 5px;
border-radius: 50%;
left: calc(50% - 50px);
top: calc(50% - 50px);
border: 5px dotted #f0d438;
animation: rotateLoader 2s linear infinite;
}

.loader__element-1 {
height: 30px;
width: 40px;
clip-path: polygon(
0% 20%,
60% 20%,
60% 0%,
100% 50%,
60% 100%,
60% 80%,
0% 80%
);
background: linear-gradient(45deg, #f1c01d, #96ec4f);
animation: scaleElement 2s linear infinite;
}

.loader__element-2 {
height: 30px;
width: 40px;
clip-path: polygon(
40% 0%,
40% 20%,
100% 20%,
100% 80%,
40% 80%,
40% 100%,
0% 50%
);
background: linear-gradient(45deg, #f1c01d, #96ec4f);
animation: scaleElement 2s linear infinite;
}

.loader-wrapper__text {
margin: 10px;
padding: 10px;
font-weight: bold;
color: #f1c01d;
border-right: 2px dotted #96ec4f;
border-left: 2px dotted #96ec4f;
text-transform: uppercase;
}

@keyframes rotateLoader {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

@keyframes scaleElement {
0% {
transform: scale(0);
height: 20px;
width: 20px;
border-radius: 50%;
}
50% {
transform: scale(1);
height: 30px;
width: 50px;
border-radius: 10px;
}
100% {
transform: scale(0);
border-radius: 50%;
height: 20px;
width: 20px;
}
}

/* Вторая анимация */
.ball-wrapper__block-1,
.ball-wrapper__block-2 {
width: 200px;
height: 100%;
background: linear-gradient(45deg, #000000, #7dd4fd);
box-shadow: 2px 2px 10px black;
border-radius: 15px;
}

.ball-wrapper__middle-block {
width: 100%;
position: relative;
display: flex;
align-items: center;
}

.middle-block__ball {
position: absolute;
width: 100px;
height: 100px;
border-radius: 50%;
background: linear-gradient(90deg, #f1c01d, #96ec4f);
box-shadow: 2px 2px 10px black;
animation: jumping 1.5s ease-in-out infinite;
}

@keyframes jumping {
0% {
left: 0;
}

50% {
left: calc(100% - 100px);
}

100% {
left: 0;
}
}

/* Третья анимация */
.animation-wrapper__infinity-animation {
width: 200px;
height: 200px;
border-radius: 50%;

animation: steps 7s ease-in-out infinite;
}

@keyframes steps {
0% {
border-radius: 100%;
background: radial-gradient(#f18239, #16e227);
}
16% {
border-radius: 0%;
}
32% {
background: linear-gradient(45deg, #f18239, #16e227);
}
48% {
transform: scale(1.5);
filter: opacity(0.4);
}
64% {
transform: rotate(360deg);
}
80% {
background: linear-gradient(315deg, #f18239, #16e227);
}
100% {
border-radius: 100%;
background: radial-gradient(#f18239, #16e227);
}
}
34 changes: 34 additions & 0 deletions src/ex10_html-css-advanced/task-01.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="task-01.css" />
<title>Task-01</title>
</head>
<body>
<div class="app">
<!-- loader for page -->
<div class="loader-wrapper">
<div class="loader-wrapper__loader">
<div class="loader__element-1"></div>
<div class="loader__element-2"></div>
</div>
<div class="loader-wrapper__text">Loading...</div>
</div>
<!-- jumping ball -->
<div class="ball-wrapper">
<div class="ball-wrapper__block-1"></div>
<div class="ball-wrapper__middle-block">
<div class="middle-block__ball"></div>
</div>
<div class="ball-wrapper__block-2"></div>
</div>
<!-- infinity animation with keyframes steps -->
<div class="animation-wrapper">
<div class="animation-wrapper__infinity-animation"></div>
</div>
</div>
</body>
</html>
Loading