<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div>
<h1>Nguyễn Hoàng Việt</h1>
<h2>Class: level 2</h2>
</div>
<div id="ball">
</div>
<script src="script.js"></script>
</body>
</html>
@keyframes bgChange {
0% { background-color: red; }
50% { background-color: yellow; }
100% { background-color: blue; }
}
@keyframes ChangeTall{
0% {transform:translateY(0px) }
100% {transform:translateY(100px) }
}
@keyframes SlideX{
0% {transform:translateX(400px) }
100% {transform:translateX(0px) }
}
div {
width: auto;
height: 50px;
background-color:red;
padding-left:20px;
animation-name:bgChange;
animation-duration:2s;
animation-iteration-count:infinite;
}
h1 {
animation-name:Simulation ;
animation-duration:3s;
animation-iteration-count:infinite;
}
h2 {
animation-name:SlideX;
animation-duration:2s;
animation-iteration-count:infinite;
}
@keyframes Simulation {
0% {transform:translateY(0px) }
50% {
transform: translateY(50px) rotate(-180deg) scale(2);
}
100% {transform:translateY(200px) }
}
#ball {
width:50px;
height:50px;
border-radius:100px;
}