Skip to content

Instantly share code, notes, and snippets.

@Alkimisti
Created January 22, 2021 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alkimisti/fa553e28200ef3ea5d691d4f2b24b222 to your computer and use it in GitHub Desktop.
Save Alkimisti/fa553e28200ef3ea5d691d4f2b24b222 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
@keyframes levizja1 {
from {
left: 0;
}
to {
left: 300px;
background-color: #4ea7f9;
}
}
#container {
width: 622px;
border-left: 2px solid black;
border-right: 2px solid black;
}
#div1, #div2 {
padding: 10px;
width: 300px;
height: 20px;
margin-bottom: 10px;
font-weight: bold;
position: relative;
animation: levizja1 3s;
left: 0;
border: 1px solid black;
}
#div1 {
animation-fill-mode: forwards;
background-color: yellow;
}
#div2 {
animation-fill-mode: backwards;
background-color: orange;
}
</style>
</head>
<body>
<div id="container">
<div id="div1">animation-fill-mode: forwards</div>
<div id="div2">animation-fill-mode: backwards</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment