<div class="info">
<p>За допомогою універсальної властивості <code>animation</code> ми можемо встановити анімаційні ефекти використовуючи CSS.</p>
<p>Нижче, показаний приклад такої анімації. Ми визначили швидкість, кількість повторень, назву та тип анімації.</p>
</div>
<div class="wrapper">
<span>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod</span>
</div>
* {
box-sizing: border-box;
}
body {
font-family: monospace;
font-size: 15px;
overflow: hidden;
line-height: 1.45;
}
.info {
padding: 6px;
}
code {
font-weight: 700;
color: #444;
border-bottom: 2px solid #666;
}
.wrapper {
background-color: #dcdcdc;
}
span {
margin-top: 0;
display: block;
animation: anim .8s linear infinite;
font-weight: 700;
padding: 8px 0;
text-align: center;
}
@keyframes anim {
0% { margin-top: 0; }
50% { margin-top: 50px; }
100% { margin-top: 0; }
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.