Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!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>Loader Animation</title>
- <style>
- body {
- background-color: rgb(48, 48, 48);
- }
- .wrapper {
- position: absolute;
- top: 50%;
- right: 50%;
- }
- .loader {
- display: inline-block;
- width: 250px;
- height: 20px;
- border-radius: 40px;
- background-color: rgba(255, 255, 255, 1);
- position: relative;
- overflow: hidden;
- }
- .loader::before {
- content: "";
- position: absolute;
- top: 0;
- left: -50px;
- width: 150%;
- height: 100%;
- background-image: linear-gradient(332deg, #6b70ff, #f8adff);
- border-radius: inherit;
- transform: scaleX(0);
- transform-origin: left;
- animation: scale 1.2s linear infinite;
- }
- @keyframes scale {
- 50% {
- transform: scaleX(1);
- }
- 100% {
- transform: scaleX(0);
- transform-origin: right;
- }
- }
- </style>
- </head>
- <body>
- <div class="wrapper">
- <span class="loader"></span>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement