How to make animations using CSS only (BEGINNER'S LEVEL)



Hey guys once again welcome to the Decoders blog, I hope you all are doing well and today I'm present with a animation(with the help of CSS/HTML beginner's level)  The given code will help you to built it, so just follow the codes and make your animation easily  , and enjoy it with your friends


<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>animations</title>
</head>
<style>
.container {
border: 2px solid red;
background-color: burlywood;
width: 100px;
height: 100px;
position: relative;
padding-top: 50px;
padding-left: 50px;
padding-right: 50px;
animation-name: type1;
animation-duration: 5s;
animation-iteration-count: infinite;


}

@keyframes type1 {
from {
left: 0;

}

to {
left: 400px;

}
}
</style>

<body>
<div class="container">
This is a box
</div>

</body>

</html>

 

Comments

Popular Posts