HTML CODE:
<!DOCTYPE html>
<html>
<head>
<title>page</title>
<link rel="stylesheet" type="text/css" href="1.page.css">
</head>
<body>
<div class="loader"><span>Loading</span></div>
</body>
</html>
CSS CODE:
body{
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-family: sans-serif;
background:#000000
}
.loader{
position: relative;
font-size: 2em;
background-color:#000000;
color: #000;
text-transform: uppercase;
font-weight: bold;
letter-spacing: .5em;
padding: 10px;
}
.loader span{
color: #fff;
mix-blend-mode: difference;
}
.loader:before{
content: "";
position: absolute;
top: 0;
left: 0;
width: 80px;
height: 100%;
background-color: #fff;
animation: ani 2s linear infinite;
}
@keyframes ani{
0%{
left: 0;
}
50%{
left: calc(100% - 80px);
}
100%{
left: 0;
}
}
Like this:
Like Loading...
Related
Published by Truecodes
Instagram: codeblogger
website: truecodes.org
View all posts by Truecodes