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;
|
|
|
|
animation-duration: 1ms;
|
|
|
|
animation-play-state: paused;
|
|
|
|
}
|
|
|
|
|
|
|
|
.animated.broken p {
|
|
|
|
animation-name: rotate45;
|
|
|
|
animation-duration: 1ms;
|
|
|
|
animation-play-state: paused;
|
|
|
|
}
|
|
|
|
|
|
|
|
.transitioned p {
|
|
|
|
transition: 1ms;
|
|
|
|
transform: rotate(45deg)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
2019-05-26 01:54:41 +03:00
|
|
|
</body>
|
|
|
|
</html>
|