Animated Loader by codepeek
Zoom
Saved
1 line⌘Z Undo
1<!--2 Author: @codepeek3 License: MIT4 Tags: #animated #dark #illustration #loader #nautical5-->6<div class="lhb" role="status">7 <span class="lhb__sr">Loading…</span>8 <div class="lhb__scene" aria-hidden="true">9 <span class="lhb__beam">10 </span>11 <span class="lhb__tower">12 </span>13 <span class="lhb__lamp">14 </span>15 <span class="lhb__rock">16 </span>17 <span class="lhb__sea">18 </span>19 </div>20 <span class="lhb__label" aria-hidden="true">Finding your way</span>21</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!--
Author: @codepeek
License: MIT
Tags: #animated #dark #illustration #loader #nautical
-->
<div class="lhb" role="status">
<span class="lhb__sr">Loading…</span>
<div class="lhb__scene" aria-hidden="true">
<span class="lhb__beam">
</span>
<span class="lhb__tower">
</span>
<span class="lhb__lamp">
</span>
<span class="lhb__rock">
</span>
<span class="lhb__sea">
</span>
</div>
<span class="lhb__label" aria-hidden="true">Finding your way</span>
</div>1/* * Author: @codepeek * License: MIT * Tags: #animated #dark #illustration #loader #nautical */2.lhb {3 position: relative;4 display: inline-flex;5 flex-direction: column;6 align-items: center;7 gap: 14px;8 font-family: ui-monospace,SFMono-Regular,Menlo,monospace9}10.lhb__sr {11 position: absolute;12 width: 1px;13 height: 1px;14 overflow: hidden;15 clip-path: inset(50%);16 white-space: nowrap17}18.lhb__scene {19 position: relative;20 width: 240px;21 height: 150px;22 overflow: hidden;23 border-radius: 12px;24 background: radial-gradient(circle at 20% 22%,#e1d9c9 0 1px,transparent 1.5px),radial-gradient(circle at 78% 14%,#e1d9c9 0 1px,transparent 1.5px),radial-gradient(circle at 62% 34%,rgba(225,217,201,.6) 0 1px,transparent 1.5px),linear-gradient(#141414,#1e2427);25 box-shadow: inset 0 0 0 1px rgba(255,255,255,.06)26}27.lhb__beam {28 position: absolute;29 z-index: 1;30 left: 120px;31 top: 36px;32 width: 150px;33 height: 56px;34 margin-top: -28px;35 background: linear-gradient(90deg,rgba(255,207,122,.85),rgba(255,207,122,0));36 clip-path: polygon(0 44%,100% 0,100% 100%,0 56%);37 transform-origin: 0 50%;38 animation: lhb-sweep 3.2s ease-in-out infinite39}40.lhb__tower {41 position: absolute;42 left: 103px;43 top: 44px;44 width: 34px;45 height: 84px;46 background: linear-gradient(90deg,rgba(0,0,0,.25),transparent 40%,rgba(0,0,0,.35)),repeating-linear-gradient(#ebe4d6 0 14px,#8e2a22 14px 28px);47 clip-path: polygon(22% 0,78% 0,100% 100%,0 100%)48}49.lhb__lamp {50 position: absolute;51 z-index: 2;52 left: 110px;53 top: 28px;54 width: 20px;55 height: 16px;56 border-radius: 2px;57 background: radial-gradient(circle,#fff4d6,#ffcf7a 50%,#c98a3c);58 box-shadow: 0 0 14px 4px rgba(255,207,122,.55);59 animation: lhb-glow 1.6s ease-in-out infinite60}61.lhb__lamp::before {62 content: "";63 position: absolute;64 left: -5px;65 right: -5px;66 bottom: 100%;67 height: 10px;68 background: #2a2722;69 clip-path: polygon(50% 0,100% 100%,0 100%)70}71.lhb__lamp::after {72 content: "";73 position: absolute;74 left: -6px;75 right: -6px;76 top: 100%;77 height: 3px;78 background: #2a272279}80.lhb__rock {81 position: absolute;82 left: 78px;83 bottom: 6px;84 width: 84px;85 height: 30px;86 border-radius: 50% 50% 0 0;87 background: linear-gradient(#3a3631,#141414)88}89.lhb__sea {90 position: absolute;91 z-index: 3;92 left: 0;93 right: 0;94 bottom: 0;95 height: 20px;96 background: radial-gradient(circle at 10px -3px,transparent 9px,#25343a 9.5px) 0 0/20px 20px repeat-x;97 animation: lhb-sea 1.6s linear infinite98}99.lhb__label {100 color: #b9ad9b;101 font-size: 10px;102 letter-spacing: .18em;103 text-transform: uppercase104}105@keyframes lhb-sweep {106 0%,100% {107 scale: 1 1108 }109 50% {110 scale: -1 1111 }112}113@keyframes lhb-glow {114 50% {115 box-shadow: 0 0 22px 8px rgba(255,207,122,.75)116 }117}118@keyframes lhb-sea {119 to {120 background-position: 20px 0121 }122}123@media (prefers-reduced-motion:reduce) {124 .lhb__beam,.lhb__lamp,.lhb__sea {125 animation: none126 }127}
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
/* * Author: @codepeek * License: MIT * Tags: #animated #dark #illustration #loader #nautical */
.lhb {
position: relative;
display: inline-flex;
flex-direction: column;
align-items: center;
gap: 14px;
font-family: ui-monospace,SFMono-Regular,Menlo,monospace
}
.lhb__sr {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap
}
.lhb__scene {
position: relative;
width: 240px;
height: 150px;
overflow: hidden;
border-radius: 12px;
background: radial-gradient(circle at 20% 22%,#e1d9c9 0 1px,transparent 1.5px),radial-gradient(circle at 78% 14%,#e1d9c9 0 1px,transparent 1.5px),radial-gradient(circle at 62% 34%,rgba(225,217,201,.6) 0 1px,transparent 1.5px),linear-gradient(#141414,#1e2427);
box-shadow: inset 0 0 0 1px rgba(255,255,255,.06)
}
.lhb__beam {
position: absolute;
z-index: 1;
left: 120px;
top: 36px;
width: 150px;
height: 56px;
margin-top: -28px;
background: linear-gradient(90deg,rgba(255,207,122,.85),rgba(255,207,122,0));
clip-path: polygon(0 44%,100% 0,100% 100%,0 56%);
transform-origin: 0 50%;
animation: lhb-sweep 3.2s ease-in-out infinite
}
.lhb__tower {
position: absolute;
left: 103px;
top: 44px;
width: 34px;
height: 84px;
background: linear-gradient(90deg,rgba(0,0,0,.25),transparent 40%,rgba(0,0,0,.35)),repeating-linear-gradient(#ebe4d6 0 14px,#8e2a22 14px 28px);
clip-path: polygon(22% 0,78% 0,100% 100%,0 100%)
}
.lhb__lamp {
position: absolute;
z-index: 2;
left: 110px;
top: 28px;
width: 20px;
height: 16px;
border-radius: 2px;
background: radial-gradient(circle,#fff4d6,#ffcf7a 50%,#c98a3c);
box-shadow: 0 0 14px 4px rgba(255,207,122,.55);
animation: lhb-glow 1.6s ease-in-out infinite
}
.lhb__lamp::before {
content: "";
position: absolute;
left: -5px;
right: -5px;
bottom: 100%;
height: 10px;
background: #2a2722;
clip-path: polygon(50% 0,100% 100%,0 100%)
}
.lhb__lamp::after {
content: "";
position: absolute;
left: -6px;
right: -6px;
top: 100%;
height: 3px;
background: #2a2722
}
.lhb__rock {
position: absolute;
left: 78px;
bottom: 6px;
width: 84px;
height: 30px;
border-radius: 50% 50% 0 0;
background: linear-gradient(#3a3631,#141414)
}
.lhb__sea {
position: absolute;
z-index: 3;
left: 0;
right: 0;
bottom: 0;
height: 20px;
background: radial-gradient(circle at 10px -3px,transparent 9px,#25343a 9.5px) 0 0/20px 20px repeat-x;
animation: lhb-sea 1.6s linear infinite
}
.lhb__label {
color: #b9ad9b;
font-size: 10px;
letter-spacing: .18em;
text-transform: uppercase
}
@keyframes lhb-sweep {
0%,100% {
scale: 1 1
}
50% {
scale: -1 1
}
}
@keyframes lhb-glow {
50% {
box-shadow: 0 0 22px 8px rgba(255,207,122,.75)
}
}
@keyframes lhb-sea {
to {
background-position: 20px 0
}
}
@media (prefers-reduced-motion:reduce) {
.lhb__beam,.lhb__lamp,.lhb__sea {
animation: none
}
}Changes made here are only a live preview and will not be saved.
Save to GitHub
GitHub opens a new file in your repository with this element filled in. Review it there and press Commit changes. Nothing is sent from codepeek and no GitHub access is needed.
◉ 1 views
Build it with AIA ready prompt with the code, the credit and how to adapt it to your project.
An oxblood and bone striped lighthouse stands on a dark rock, its amber lamp throwing a beam that sweeps out over the scalloped night sea and back.
Choose where to donate
Select a platform to continue.
Community
Comments 0
Code copied
SUPPORT THE CREATOR
Would you like to donate to the creator to help them keep creating content?
You need to sign in before you can write a comment.