Created
March 25, 2021 04:57
-
-
Save w3collective/83a1d1e730a2f7c4df77290760a55a78 to your computer and use it in GitHub Desktop.
CSS skeleton loading screen animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Skeleton loading screen</title> | |
<style> | |
.video:empty { | |
width: 315px; | |
height: 250px; | |
cursor: progress; | |
background: | |
linear-gradient(0.25turn, transparent, #fff, transparent), | |
linear-gradient(#eee, #eee), | |
radial-gradient(38px circle at 19px 19px, #eee 50%, transparent 51%), | |
linear-gradient(#eee, #eee); | |
background-repeat: no-repeat; | |
background-size: 315px 250px, 315px 180px, 100px 100px, 225px 30px; | |
background-position: -315px 0, 0 0, 0px 190px, 50px 195px; | |
animation: loading 1.5s infinite; | |
} | |
@keyframes loading { | |
to { | |
background-position: 315px 0, 0 0, 0 190px, 50px 195px; | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div class="video"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source => https://w3collective.com/skeleton-loading-screen/