Свойство animation-play-state
Описание
Указывает состояние анимации. Анимацию можно поставить на паузу и после этого воспроизвести с того места, где она была остановлена.
Синтаксис
animation-play-state: running | paused;
Значение | Описание |
running | Проигрывать анимацию. |
paused | Поставить анимацию на паузу. |
Пример
<!DOCTYPE html>
<html lang='ru'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>Document</title>
</head>
<body>
<style>
#anima{
width: 105px;
height: 105px;
border-radius: 5px;
background-color: lightgreen;
border: 3px dotted black;
animation: rotate-name 3s 1s;
animation-fill-mode: both;
animation-play-state: running;
}
@keyframes rotate-name{
0%{
transform: translateX(0) rotate(0);
}
100%{
transform: translateX(200px) rotate(2turn);
}
}
</style>
<div id='anima'></div>
</body>
</html>
Читайте также
Функция repeating-radial-gradient()
По своему действию похож на радиальный градиент, который делается функцией <span class=...
Свойство line-clamp
Ограничивает текст заданным числом строк. При превышении текста указанным числом строк, он обреза...
Стиль непосещенных ссылок
Псевдокласс :link применяется к ссылкам, которые ещё не посещались пользователем, и задаёт для ни...
Свойство border-left-width
Устанавливает толщину левой границы элемента.
Свойство list-style-image
Указывает адрес изображения, которое служит в качестве маркера списка.