2019-05-26 01:54:41 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Animation</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
<script type="text/javascript" src="../test.js"></script>
|
|
|
|
<style>
|
|
|
|
body {
|
|
|
|
font-family: Arial;
|
|
|
|
}
|
|
|
|
|
2021-08-13 13:15:55 +03:00
|
|
|
@keyframes rotate0 {
|
2019-05-26 01:54:41 +03:00
|
|
|
0% {
|
|
|
|
transform: rotate(0deg);
|
2021-08-13 13:15:55 +03:00
|
|
|
}
|
|
|
|
}
|
2019-05-26 01:54:41 +03:00
|
|
|
|
2021-08-13 13:15:55 +03:00
|
|
|
@keyframes rotate45 {
|
2019-05-26 01:54:41 +03:00
|
|
|
0% {
|
2021-08-13 13:15:55 +03:00
|
|
|
transform: rotate(45deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
p {
|
|
|
|
font: 22px/1 Arial, sans-serif;
|
|
|
|
position: absolute;
|
|
|
|
top: 25%;
|
|
|
|
left: 25%;
|
|
|
|
width: 50%;
|
|
|
|
height: 50%;
|
|
|
|
color: #fff;
|
|
|
|
background-color: #666;
|
|
|
|
line-height: 90px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.transformed.working p {
|
|
|
|
transform: rotate(45deg);
|
|
|
|
}
|
|
|
|
|
|
|
|
.animated.working p {
|
|
|
|
animation-name: rotate0;
|
2021-08-14 09:05:15 +03:00
|
|
|
animation-duration: 1ms, 1ms;
|
2021-08-13 13:15:55 +03:00
|
|
|
animation-play-state: paused;
|
|
|
|
}
|
|
|
|
|
|
|
|
.animated.broken p {
|
|
|
|
animation-name: rotate45;
|
|
|
|
animation-duration: 1ms;
|
|
|
|
animation-play-state: paused;
|
|
|
|
}
|
|
|
|
|
|
|
|
.transitioned p {
|
2021-08-14 09:05:15 +03:00
|
|
|
transition: 1ms, 1ms;
|
2021-08-13 13:15:55 +03:00
|
|
|
transform: rotate(45deg)
|
|
|
|
}
|
|
|
|
|
2021-08-14 11:22:36 +03:00
|
|
|
.transition-delay {
|
|
|
|
transition: 1ms;
|
|
|
|
transition-delay: 50ms;
|
|
|
|
transform: rotate(45deg)
|
|
|
|
}
|
2021-08-13 13:15:55 +03:00
|
|
|
|
|
|
|
div {
|
|
|
|
float: left;
|
|
|
|
clear: left;
|
|
|
|
margin-right: 10px;
|
|
|
|
background-color: #ccc;
|
|
|
|
width: 180px;
|
|
|
|
height: 180px;
|
|
|
|
position: relative;
|
|
|
|
}
|
2019-05-26 01:54:41 +03:00
|
|
|
</style>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
2021-08-13 13:15:55 +03:00
|
|
|
<div class="transformed working">
|
|
|
|
<p>Hello</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="animated working">
|
|
|
|
<p>Hello</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="animated broken">
|
|
|
|
<p>Hello</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="transitioned broken">
|
|
|
|
<p>Hello</p>
|
|
|
|
</div>
|
2021-08-14 11:22:36 +03:00
|
|
|
|
|
|
|
<div class="transition-delay">
|
|
|
|
<p>Hello</p>
|
|
|
|
</div>
|
2019-05-26 01:54:41 +03:00
|
|
|
</body>
|
|
|
|
</html>
|