Datasets:
File size: 2,948 Bytes
61cb1f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | <!DOCTYPE html>
<html>
<head>
<style>/**
* This work is licensed under the Creative Commons
* Attribution 3.0 Unported License. To view a copy
* of this license, visit http://creativecommons.org/licenses/by/3.0/.
*
* Author: Girish Sharma <scrapmachines@gmail.com>
*/
/* Demo specific styles begin */
* { margin: 0; padding: 0; }
body {
background: #222;
}
.loader-ring {
top: calc(50% - 100px);
left: 50%;
pointer-events: none;
}
.btn {
position: absolute;
min-width: 90px;
min-height: 90px;
line-height: 90px;
background: #25292C;
margin: auto auto;
top: calc(50% - 50px);
left: calc(50% - 50px);
text-align: center;
border-radius: 999px;
color: rgba(155,155,155,1);
text-shadow: -1px -1px 0px rgba(255,255,255,0.8),
1px 1px 2px rgba(0,0,0,1);
font-family: sans-serif;
box-shadow: inset 1px 1px 2px rgba(255,255,255,0.3),
inset 3px 15px 45px rgba(255,255,255,0.1),
inset -1px -1px 2px rgba(0,0,0,0.5),
inset -3px -15px 45px rgba(0,0,0,0.2),
1px 5px 30px -4px rgba(0,0,0,1);
transition: 0.1s ease-out;
}
.btn:before {
content: "";
background: #1A1A1A;
width: 120px;
height: 120px;
position: absolute;
top: -15px;
left: -15px;
z-index: -99;
border-radius: 999px;
box-shadow: inset -1px -1px 2px rgba(255,255,255,0.3),
inset -5px -15px 40px rgba(255,255,255,0.1),
inset 1px 1px 2px rgba(0,0,0,0.5),
inset 5px 15px 40px rgba(0,0,0,0.2),
-2px -40px 50px -20px rgba(255,255,255,0.1),
2px 35px 50px -10px rgba(0,0,0,0.4),
0px 0px 25px 8px rgba(60,60,60,1);
}
a {
font-family: arial, sans-serif;
font-weight: 600;
font-size: 0.9rem;
text-decoration: none;
position: fixed;
bottom: 0;
right: 0;
margin: 5px;
color: #555;
}
a:hover {
color: #888;
}
b {
position: absolute;
left: 50%;
margin-right: -50%;
transform: translateX(-50%);
top: calc(50% - 200px);
color: rgba(155,155,155,1);
font-family: sans-serif;
}
/* Demo specific styles end */
.loader-ring {
position: absolute;
height: 100px;
width: 100px;
border-radius: 0 100% 0 0;
border: 1px solid white;
border-width: 0px 5px 0px 0px;
box-shadow: 5px 1px 2px -4px white,
inset -4px 1px 3px -4px white;
transform-origin: 0px 100%;
animation: rotate 1s linear infinite;
}
.loader-ring:after {
position: absolute;
height: 1px;
width: 1px;
top: 100%;
left: calc(100% + 2px);
border-radius: 100%;
border-width: 0;
background: white;
box-shadow: 0px 0 3px 5px white;
content: '';
}
@keyframes rotate {
to {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<span class="btn">Long Tail</span>
<b>Single DIV Loading ring in Pure CSS</b>
<!--- This div below is the main DOM element for the demo -->
<div class="loader-ring"></div>
<script></script>
</body>
</html> |