how to make spinner in html

Solutions on MaxInterview for how to make spinner in html by the best coders in the world

showing results for - "how to make spinner in html"
Jibril
11 Jan 2019
1<!DOCTYPE html>
2<html>
3<head>
4<meta name="viewport" content="width=device-width, initial-scale=1">
5<style>
6.loader {
7  border: 16px solid #f3f3f3;
8  border-radius: 50%;
9  border-top: 16px solid #3498db;
10  width: 120px;
11  height: 120px;
12  -webkit-animation: spin 2s linear infinite; /* Safari */
13  animation: spin 2s linear infinite;
14}
15/* Safari */
16@-webkit-keyframes spin {
17  0% { -webkit-transform: rotate(0deg); }
18  100% { -webkit-transform: rotate(360deg); }
19}
20@keyframes spin {
21  0% { transform: rotate(0deg); }
22  100% { transform: rotate(360deg); }
23}
24</style>
25</head>
26<body>
27<h2>How To Create A Loader</h2>
28<div class="loader"></div>
29</body>
30</html>