css3 html5 animation |
Cообщение скрыто для удобства комментирования.
Прочитать сообщение
| Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] 2 3 [Новые] |
<!DOCTYPE html>
<html>
<head>
<title>Привет, animation!</title>
<meta charset="utf-8">
<base href="/assets/course80/">
<link rel="stylesheet" href="epoch1.css">
</head>
<body class="ancient">
<div class="stone">
<div class="wood-wheel"></div>
</div>
</body>
</html>
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.wood-wheel {
animation-name: rotate;
animation-duration: 60s;
}
<!DOCTYPE html>
<html>
<head>
<title>@keyframes: раскадровка</title>
<meta charset="utf-8">
<base href="/assets/course80/">
<link rel="stylesheet" href="epoch1.css">
</head>
<body class="ancient">
<div class="stone">
<div class="barrow-wheel"></div>
</div>
</body>
</html>
.barrow-wheel {
animation-name: rotate;
animation-duration: 2s;
}
@keyframes rotate {
50% {
transform: rotate(-90deg);
}
100% {
transform: rotate(360deg);
}
}
<!DOCTYPE html>
<html>
<head>
<title>@keyframes: from и to</title>
<meta charset="utf-8">
<base href="/assets/course80/">
<link rel="stylesheet" href="epoch1.css">
</head>
<body class="ancient">
<div class="lift-top">
<div class="platform">
<span class="stone-wheel"></span>
</div>
</div>
</body>
</html>
.platform {
animation-name: lift-up;
animation-duration: 3s;
}
@keyframes lift-up {
from { transform: translateY(0px); }
50% {transform: translateY(-250px); }
100% { transform: translateY(-300px); }
}
.platform {
animation-name: lift-up;
animation-duration: 3s;
}
@keyframes lift-up {
0% {
transform: translateY(0px);
}
50%,80% {
transform: translateY(-250px);
}
100% {
transform: translateY(-300px);
}
}
@keyframes rotate {
50% {
transform: rotate(360deg);
}
}
.stone-wheel {
animation-name: rotate;
animation-duration: 3s;
}
@keyframes rotate {
50% {
transform: rotate(360deg);
}
}
@keyframes move {
50% {
bottom: 0px;
}
100% {
bottom: -50px;
}
}
.stone-wheel {
animation-name: rotate , move;
animation-duration: 3s ,6s;
}
.ship {
animation-name: move-ship;
animation-duration: 40s;
}
.clouds {
animation-name: move-clouds;
animation-duration: 40s;
}
.sun-small {
animation-name: move-sun;
animation-duration: 10s;
}
@keyframes move-comet {
100% {
transform: translate(400px, 375px);
}
}
@keyframes move-clouds {
to {
transform: translateX(-1000px);
}
}
@keyframes move-sun {
to {
transform: translate(350px, -400px);
}
}
@keyframes move-ship {
to {
transform: translateX(1000px);
}
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
50% {
transform: rotate(90deg);
}
100% {
transform: rotate(0deg);
}
}
.arrow {
animation-name: rotate;
animation-duration: 2s;
animation-iteration-count : infinite;
}
<!DOCTYPE html>
<html>
<head>
<title>Количество проигрываний анимации animation-iteration-count</title>
<meta charset="utf-8">
<base href="/assets/course80/">
<link rel="stylesheet" href="epoch2.css">
</head>
<body class="mechanical">
<div class="clock">
<span class="arrow"></span>
</div>
</body>
</html>
@keyframes clockwise {
to {
transform: rotate(180deg);
}
}
@keyframes anticlockwise {
to {
transform: rotate(-180deg);
}
}
.gear-big{
animation-name: clockwise;
animation-duration: 2s;
animation-iteration-count : infinite;
animation-direction : reverse;
}
.gear-small{
animation-name: anticlockwise;
animation-duration: 2s;
animation-direction : reverse;
animation-iteration-count : infinite;
}
@keyframes clockwise {
to {
transform: rotate(180deg);
}
}
@keyframes anticlockwise {
to {
transform: rotate(-180deg);
}
}
.gear-big {
animation-name: clockwise;
animation-duration: 2s;
animation-iteration-count: 2;
animation-direction: alternate-reverse;
}
.gear-small {
animation-name: anticlockwise;
animation-duration: 2s;
animation-iteration-count: 2;
animation-direction: alternate-reverse;
}
.element {
animation-name: move;
animation-duration: 1s;
animation-iteration-count: 2;
animation-direction: alternate-reverse;
}
@keyframes rotate {
to {
transform: rotate(360deg);
}
}
.arrow-small {
animation-name: rotate;
animation-duration: 1s;
}
@keyframes rotate {
to {
transform: rotate(360deg);
}
}
.arrow-small {
animation-name: rotate;
animation-duration: 1s;
}
@keyframes ding {
33% {
transform: translateX(-15px);
}
66% {
transform: translateX(15px);
}
}
.bell {
animation-name: ding;
animation-duration: 1s;
}
| Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] 2 3 [Новые] |