Last active
September 17, 2018 08:09
-
-
Save rjuevesano/279a054725009d5367bd32122cd547bb to your computer and use it in GitHub Desktop.
An example of how to place the loader in the middle of the page.
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.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Loader</title> | |
<style> | |
.loading { | |
z-index: 1; | |
width: 100%; | |
height: 100%; | |
position: fixed; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
background-color: rgba(0,0,0,.5); | |
} | |
.loading-wheel { | |
border-style: double; | |
border-color: #ccc transparent; | |
width: 20px; | |
height: 20px; | |
margin-top: -40px; | |
margin-left: -40px; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
border-width: 30px; | |
border-radius: 50%; | |
-webkit-animation: spin 1s linear infinite; | |
} | |
@-webkit-keyframes spin { | |
0% { | |
-webkit-transform: rotate(0); | |
} | |
100% { | |
-webkit-transform: rotate(-360deg); | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div class="loading"> | |
<div class="loading-wheel"></div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment