mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
477 lines
No EOL
8.5 KiB
HTML
477 lines
No EOL
8.5 KiB
HTML
<div class="container">
|
|
<div class="road">
|
|
<div class="police">
|
|
<div class="light_beam"></div>
|
|
<p>Police</p>
|
|
<article>Police</article>
|
|
<div class="side_mirror"></div>
|
|
<span>
|
|
<b></b>
|
|
<i></i>
|
|
</span>
|
|
</div>
|
|
<div class="police">
|
|
<div class="light_beam"></div>
|
|
<p>Police</p>
|
|
<article>Police</article>
|
|
<div class="side_mirror"></div>
|
|
<span>
|
|
<b></b>
|
|
<i></i>
|
|
</span>
|
|
</div>
|
|
<div class="taxi">
|
|
<div class="light_beam"></div>
|
|
<div class="side_mirror"></div>
|
|
<span>
|
|
<b></b>
|
|
<i></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<span class="loading">Loading..</span>
|
|
</div>
|
|
|
|
<style>
|
|
/* From Uiverse.io by omriluz - Website: https://www.youtube.com/watch?v=3sQupmAMUhs&ab_channel=OnlineTutorials - Name: online tutorials - Tags: flashy, animation, red, blue, loader */
|
|
.container {
|
|
background-color: #355463;
|
|
height: 100%;
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.road {
|
|
position: relative;
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
transform-style: preserve-3d;
|
|
transform: rotate(-15deg);
|
|
}
|
|
|
|
.road::before {
|
|
content: "";
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 4px;
|
|
background: linear-gradient(
|
|
90deg,
|
|
#fff,
|
|
#fff 50%,
|
|
transparent 50%,
|
|
transparent 100%
|
|
);
|
|
background-size: 50px;
|
|
animation: animate_road 0.07s linear infinite;
|
|
}
|
|
|
|
@keyframes animate_road {
|
|
0% {
|
|
background-position: 50px 0;
|
|
}
|
|
100% {
|
|
background-position: 0px 0;
|
|
}
|
|
}
|
|
|
|
.police {
|
|
position: absolute;
|
|
left: -100px;
|
|
width: 200px;
|
|
height: 80px;
|
|
background-color: #3f4c54;
|
|
border-radius: 10px;
|
|
box-shadow: -10px 10px rgba(0, 0, 0, 0.05);
|
|
transform-style: preserve-3d;
|
|
perspective: 800px;
|
|
z-index: 10;
|
|
animation: animate_police_car 5s linear infinite;
|
|
}
|
|
|
|
.police:nth-child(2) {
|
|
left: 200px;
|
|
animation-delay: -2.5s;
|
|
}
|
|
|
|
@keyframes animate_police_car {
|
|
0% {
|
|
transform: translateX(20px) translateY(-50px);
|
|
}
|
|
25% {
|
|
transform: translateX(-10px) translateY(0);
|
|
}
|
|
50% {
|
|
transform: translateX(20px) translateY(50px);
|
|
}
|
|
75% {
|
|
transform: translateX(-10px) translateY(0px);
|
|
}
|
|
100% {
|
|
transform: translateX(20px) translateY(-50px);
|
|
}
|
|
}
|
|
|
|
.police::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 12px;
|
|
left: 3px;
|
|
width: 5px;
|
|
height: 15px;
|
|
border-radius: 2px;
|
|
box-shadow: 0 42px #fc3c25;
|
|
background-color: #fc3c25;
|
|
}
|
|
|
|
.police::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 12px;
|
|
right: 2px;
|
|
width: 6px;
|
|
height: 16px;
|
|
border-radius: 2px;
|
|
box-shadow: 0 44px #fff;
|
|
background-color: #fff;
|
|
}
|
|
|
|
.police span {
|
|
position: absolute;
|
|
inset: 5px 10px;
|
|
background-color: #475b66;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.police span::before {
|
|
content: "911";
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%) rotate(90deg);
|
|
color: #333;
|
|
font-size: 1.15em;
|
|
font-weight: 1000;
|
|
letter-spacing: 0.1em;
|
|
z-index: 10;
|
|
}
|
|
|
|
.police span::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 35%;
|
|
left: 60%;
|
|
transform: translate(-50%, 50%);
|
|
z-index: 100;
|
|
width: 6px;
|
|
height: 10px;
|
|
background: #29282b;
|
|
box-shadow: 0 -10px #1f5fff, 0 10px #df1b25;
|
|
}
|
|
|
|
.police span b {
|
|
position: absolute;
|
|
inset: 0 30px;
|
|
background-color: #344650;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
.police span b::before {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 6px 25px;
|
|
background: #ebebeb;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.police span b::after {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 0 58px;
|
|
background: #ebebeb;
|
|
}
|
|
|
|
.police span i {
|
|
position: absolute;
|
|
inset: 0;
|
|
}
|
|
|
|
.police span i::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 7px;
|
|
left: 20px;
|
|
width: 40px;
|
|
height: 5px;
|
|
background-color: #ebebeb;
|
|
transform-origin: right;
|
|
transform: rotate(15deg);
|
|
box-shadow: 100px 34px #ebebeb;
|
|
}
|
|
|
|
.police span i::after {
|
|
content: "";
|
|
position: absolute;
|
|
bottom: 7px;
|
|
left: 20px;
|
|
width: 40px;
|
|
height: 5px;
|
|
background-color: #ebebeb;
|
|
transform-origin: right;
|
|
transform: rotate(-15deg);
|
|
box-shadow: 100px -34px #ebebeb;
|
|
}
|
|
|
|
.light_beam {
|
|
position: absolute;
|
|
top: 5px;
|
|
right: -2px;
|
|
width: 10px;
|
|
height: 70px;
|
|
background-color: #0002;
|
|
border-radius: 15px;
|
|
transform-style: preserve-3d;
|
|
}
|
|
|
|
.light_beam::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 5px;
|
|
left: 0;
|
|
width: 150px;
|
|
height: 16px;
|
|
background: linear-gradient(90deg, #fff6, transparent);
|
|
transform-origin: left;
|
|
transform: perspective(500px) rotateY(-50degkk);
|
|
}
|
|
|
|
.light_beam::after {
|
|
content: "";
|
|
position: absolute;
|
|
bottom: 5px;
|
|
left: 0;
|
|
width: 150px;
|
|
height: 16px;
|
|
background: linear-gradient(90deg, #fff6, transparent);
|
|
transform-origin: left;
|
|
transform: perspective(500px) rotateY(-50deg);
|
|
}
|
|
|
|
.police p {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: -5px;
|
|
color: #fff;
|
|
text-transform: uppercase;
|
|
z-index: 10;
|
|
transform: translateY(-50%) rotate(90deg) scale(0.75);
|
|
}
|
|
|
|
.police article {
|
|
position: absolute;
|
|
top: 50%;
|
|
right: -5%;
|
|
color: #fff;
|
|
text-transform: uppercase;
|
|
z-index: 10;
|
|
transform: translateY(-50%) rotate(270deg) scale(0.75);
|
|
}
|
|
|
|
.police .side_mirror {
|
|
position: absolute;
|
|
inset: 0;
|
|
}
|
|
|
|
.police .side_mirror::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: -8px;
|
|
right: 40px;
|
|
width: 5px;
|
|
height: 10px;
|
|
background-color: #ebebeb;
|
|
border-top-right-radius: 10px;
|
|
}
|
|
|
|
.police .side_mirror::after {
|
|
content: "";
|
|
position: absolute;
|
|
bottom: -8px;
|
|
right: 40px;
|
|
width: 5px;
|
|
height: 10px;
|
|
background-color: #ebebeb;
|
|
border-bottom-right-radius: 10px;
|
|
}
|
|
|
|
.taxi {
|
|
position: absolute;
|
|
right: 200px;
|
|
width: 200px;
|
|
height: 80px;
|
|
background-color: #f4b503;
|
|
border-radius: 10px;
|
|
box-shadow: -10px 10px rgba(0, 0, 0, 0.1);
|
|
transform-style: preserve-3d;
|
|
perspective: 800px;
|
|
z-index: 10;
|
|
animation: animate_taxi 5s linear infinite;
|
|
animation-delay: -5s;
|
|
}
|
|
|
|
@keyframes animate_taxi {
|
|
0% {
|
|
transform: translateX(20px) translateY(20px);
|
|
}
|
|
25% {
|
|
transform: translateX(-50px) translateY(0px);
|
|
}
|
|
50% {
|
|
transform: translateX(20px) translateY(-20px);
|
|
}
|
|
75% {
|
|
transform: translateX(50px) translateY(0px);
|
|
}
|
|
100% {
|
|
transform: translateX(20px) translateY(20px);
|
|
}
|
|
}
|
|
|
|
.taxi::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 12px;
|
|
left: 3px;
|
|
width: 5px;
|
|
height: 15px;
|
|
border-radius: 2px;
|
|
box-shadow: 0 42px #fc3c25;
|
|
background-color: #fc3c25;
|
|
}
|
|
|
|
.taxi::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 12px;
|
|
right: 2px;
|
|
width: 6px;
|
|
height: 16px;
|
|
border-radius: 2px;
|
|
box-shadow: 0 44px #fff;
|
|
background-color: #fff;
|
|
}
|
|
.taxi span {
|
|
position: absolute;
|
|
inset: 5px 10px;
|
|
background-color: #fdd206;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.taxi span::before {
|
|
content: "Taxi";
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%) rotate(90deg);
|
|
background-color: #fff;
|
|
padding: 2px;
|
|
font: 0.75em;
|
|
font-weight: 1000;
|
|
letter-spacing: 0.1em;
|
|
text-transform: uppercase;
|
|
border-radius: 2px;
|
|
box-shadow: 0 0 0 1px #0005;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.taxi span b {
|
|
position: absolute;
|
|
inset: 0 30px;
|
|
background-color: #111;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
.taxi span b::before {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 6px 25px;
|
|
background: #fdd206;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.taxi span b::after {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 0 58px;
|
|
background: #fdd206;
|
|
}
|
|
|
|
.taxi span i {
|
|
position: absolute;
|
|
inset: 0;
|
|
}
|
|
|
|
.taxi span i::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 7px;
|
|
left: 20px;
|
|
width: 40px;
|
|
height: 5px;
|
|
background-color: #fdd206;
|
|
transform-origin: right;
|
|
transform: rotate(15deg);
|
|
box-shadow: 100px 34px #fdd206;
|
|
}
|
|
|
|
.taxi span i::after {
|
|
content: "";
|
|
position: absolute;
|
|
bottom: 7px;
|
|
left: 20px;
|
|
width: 40px;
|
|
height: 5px;
|
|
background-color: #fdd206;
|
|
transform-origin: right;
|
|
transform: rotate(-15deg);
|
|
box-shadow: 100px -34px #fdd206;
|
|
}
|
|
|
|
.loading {
|
|
position: absolute;
|
|
left: 50%;
|
|
bottom: 30%;
|
|
background-color: black;
|
|
padding: 10px;
|
|
font-size: 1.25rem;
|
|
color: #fff;
|
|
font-weight: 1000;
|
|
border-radius: 10px;
|
|
animation: animate_loading 5s infinite linear;
|
|
}
|
|
|
|
@keyframes animate_loading {
|
|
0% {
|
|
transform: translateX(-20px) translateY(-20px);
|
|
}
|
|
25% {
|
|
transform: translateX(50px) translateY(10px);
|
|
}
|
|
50% {
|
|
transform: translateX(-20px) translateY(20px);
|
|
}
|
|
75% {
|
|
transform: translateX(70px) translateY(-30px);
|
|
}
|
|
100% {
|
|
transform: translateX(-20px) translateY(-20px);
|
|
}
|
|
}
|
|
|
|
</style>
|
|
|