2026-01-04 22:50:34 +05:00
|
|
|
<!-- Based on: https://github.com/rembertdesigns/Iron-Man-Arc-Reactor-Pure-CSS -->
|
|
|
|
|
<!-- and https://codepen.io/FlyingEmu/pen/DZNqEj -->
|
|
|
|
|
|
2023-06-11 19:18:58 +05:00
|
|
|
<div id="arc-reactor" class="reactor-container">
|
|
|
|
|
<div class="reactor-container-inner circle abs-center">
|
2026-01-04 22:50:34 +05:00
|
|
|
<ul class="marks">
|
|
|
|
|
{#each Array(60) as _, i}
|
|
|
|
|
<li></li>
|
|
|
|
|
{/each}
|
|
|
|
|
</ul>
|
2023-06-11 19:18:58 +05:00
|
|
|
<div class="e7">
|
|
|
|
|
<div class="semi_arc_3 e5_1">
|
|
|
|
|
<div class="semi_arc_3 e5_2">
|
|
|
|
|
<div class="semi_arc_3 e5_3">
|
2026-01-04 22:50:34 +05:00
|
|
|
<div class="semi_arc_3 e5_4"></div>
|
2023-06-11 19:18:58 +05:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-04 22:50:34 +05:00
|
|
|
<div class="tunnel circle abs-center"></div>
|
|
|
|
|
<div class="core-wrapper circle abs-center"></div>
|
|
|
|
|
<div class="core-outer circle abs-center"></div>
|
|
|
|
|
<div class="core-inner circle abs-center"></div>
|
2023-06-11 19:18:58 +05:00
|
|
|
<div class="coil-container">
|
2026-01-04 22:50:34 +05:00
|
|
|
{#each Array(8) as _, i}
|
|
|
|
|
<div class="coil coil-{i + 1}"></div>
|
|
|
|
|
{/each}
|
2023-06-11 19:18:58 +05:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" global>
|
2026-01-04 22:50:34 +05:00
|
|
|
// [ Variables ]--
|
|
|
|
|
$arc-radius: 130px;
|
2023-06-11 19:18:58 +05:00
|
|
|
$size3: 6px;
|
|
|
|
|
$cshadow: rgba(2, 254, 255, 0.8);
|
2026-01-04 22:50:34 +05:00
|
|
|
$marks-color-1: rgba(2, 254, 255, 1);
|
|
|
|
|
$marks-color-2: rgba(2, 254, 255, 0.3);
|
2023-06-11 19:18:58 +05:00
|
|
|
$colour1: rgba(2, 255, 255, 0.15);
|
|
|
|
|
$colour3: rgba(2, 255, 255, 0.3);
|
|
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
// [ Base container ]--
|
2023-06-11 19:18:58 +05:00
|
|
|
.reactor-container {
|
|
|
|
|
width: 300px;
|
|
|
|
|
height: 320px;
|
|
|
|
|
margin: auto;
|
|
|
|
|
position: relative;
|
|
|
|
|
border-radius: 50%;
|
2026-01-04 22:50:34 +05:00
|
|
|
transition: scale 1s ease, opacity 0.5s ease;
|
2023-06-11 19:18:58 +05:00
|
|
|
scale: 0.9;
|
2026-01-04 22:50:34 +05:00
|
|
|
opacity: 0.9;
|
2023-06-11 19:18:58 +05:00
|
|
|
|
|
|
|
|
ul {
|
|
|
|
|
list-style: none;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
|
2023-06-11 19:18:58 +05:00
|
|
|
.reactor-container-inner {
|
|
|
|
|
height: 238px;
|
|
|
|
|
width: 238px;
|
|
|
|
|
background-color: #161a1b;
|
|
|
|
|
box-shadow: 0px 0px 50px 15px $colour3, inset 0px 0px 50px 15px $colour3;
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
|
|
|
|
|
// [ Utility classes ]--
|
2023-06-11 19:18:58 +05:00
|
|
|
.circle {
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
|
2023-06-11 19:18:58 +05:00
|
|
|
.abs-center {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
margin: auto;
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
|
|
|
|
|
// [ Core elements ]--
|
2023-06-11 19:18:58 +05:00
|
|
|
.core-inner {
|
|
|
|
|
width: 70px;
|
|
|
|
|
height: 70px;
|
|
|
|
|
border: 5px solid #1b4e5f;
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
box-shadow: 0px 0px 7px 5px #52fefe, 0px 0px 10px 10px #52fefe inset;
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
|
2023-06-11 19:18:58 +05:00
|
|
|
.core-outer {
|
|
|
|
|
width: 120px;
|
|
|
|
|
height: 120px;
|
|
|
|
|
border: 1px solid #52fefe;
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
box-shadow: 0px 0px 2px 1px #52fefe, 0px 0px 10px 5px #52fefe inset;
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
|
2023-06-11 19:18:58 +05:00
|
|
|
.core-wrapper {
|
|
|
|
|
width: 180px;
|
|
|
|
|
height: 180px;
|
|
|
|
|
background-color: #073c4b;
|
|
|
|
|
box-shadow: 0px 0px 5px 4px #52fefe, 0px 0px 6px 2px #52fefe inset;
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
|
2023-06-11 19:18:58 +05:00
|
|
|
.tunnel {
|
|
|
|
|
width: 220px;
|
|
|
|
|
height: 220px;
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
box-shadow: 0px 0px 5px 1px #52fefe, 0px 0px 5px 4px #52fefe inset;
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
|
|
|
|
|
// [ Coil animation ]--
|
2023-06-11 19:18:58 +05:00
|
|
|
.coil-container {
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
animation: 10s infinite linear reactor-anim;
|
|
|
|
|
transition: animation 1s;
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
|
2023-06-11 19:18:58 +05:00
|
|
|
.coil {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 30px;
|
|
|
|
|
height: 20px;
|
|
|
|
|
top: calc(50% - 110px);
|
|
|
|
|
left: calc(50% - 15px);
|
|
|
|
|
transform-origin: 15px 110px;
|
|
|
|
|
background-color: #073c4b;
|
|
|
|
|
box-shadow: 0px 0px 5px #52fefe inset;
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
|
|
|
|
|
@for $i from 1 through 8 {
|
|
|
|
|
.coil-#{$i} {
|
|
|
|
|
transform: rotate(#{($i - 1) * 45}deg);
|
2023-06-11 19:18:58 +05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
@keyframes reactor-anim {
|
|
|
|
|
from { transform: rotate(0deg); }
|
|
|
|
|
to { transform: rotate(360deg); }
|
2023-06-11 19:18:58 +05:00
|
|
|
}
|
|
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
// [ Arc element ]--
|
2023-06-11 19:18:58 +05:00
|
|
|
.e7 {
|
|
|
|
|
position: relative;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
width: 160%;
|
|
|
|
|
height: 160%;
|
|
|
|
|
left: -32.5%;
|
|
|
|
|
top: -32.5%;
|
|
|
|
|
right: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
margin: auto;
|
|
|
|
|
border: $size3 solid transparent;
|
|
|
|
|
background: transparent;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
transform: rotateZ(0deg);
|
|
|
|
|
transition: box-shadow 3s ease;
|
|
|
|
|
text-align: center;
|
2026-01-04 22:50:34 +05:00
|
|
|
opacity: 0.3;
|
2023-06-11 19:18:58 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.semi_arc_3 {
|
|
|
|
|
content: "";
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 94%;
|
|
|
|
|
height: 94%;
|
|
|
|
|
left: 3%;
|
|
|
|
|
top: 3%;
|
|
|
|
|
border: 5px solid #02feff;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
animation: rotate 4s linear infinite;
|
|
|
|
|
text-align: center;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
@keyframes rotate {
|
|
|
|
|
0% { transform: rotateZ(0deg); }
|
|
|
|
|
100% { transform: rotateZ(360deg); }
|
2023-06-11 19:18:58 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes rotate_anti {
|
2026-01-04 22:50:34 +05:00
|
|
|
0% { transform: rotateZ(0deg); }
|
|
|
|
|
100% { transform: rotateZ(-360deg); }
|
2023-06-11 19:18:58 +05:00
|
|
|
}
|
|
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
// [ Marks ]--
|
2023-06-11 19:18:58 +05:00
|
|
|
.marks {
|
|
|
|
|
li {
|
2026-01-04 22:50:34 +05:00
|
|
|
width: 11px;
|
2023-06-11 19:18:58 +05:00
|
|
|
height: 11px;
|
|
|
|
|
background: $cshadow;
|
|
|
|
|
position: absolute;
|
|
|
|
|
margin-left: 117.5px;
|
|
|
|
|
margin-top: 113.5px;
|
|
|
|
|
animation: colour_ease2 3s infinite ease-in-out;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes colour_ease2 {
|
2026-01-04 22:50:34 +05:00
|
|
|
0% { background: $marks-color-1; }
|
|
|
|
|
50% { background: $marks-color-2; }
|
|
|
|
|
100% { background: $marks-color-1; }
|
2023-06-11 19:18:58 +05:00
|
|
|
}
|
|
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
// generate mark rotations
|
|
|
|
|
@for $i from 1 through 60 {
|
|
|
|
|
.marks li:nth-child(#{$i}) {
|
|
|
|
|
transform: rotate(#{$i * 6}deg) translateY($arc-radius);
|
|
|
|
|
}
|
2023-06-11 19:18:58 +05:00
|
|
|
}
|
|
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
// [ Active state ]--
|
2023-06-11 19:18:58 +05:00
|
|
|
.reactor-container.active {
|
2026-01-04 22:50:34 +05:00
|
|
|
scale: 1.1;
|
|
|
|
|
opacity: 1;
|
2023-06-11 19:18:58 +05:00
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
.coil-container {
|
|
|
|
|
animation: 3s infinite linear reactor-anim;
|
|
|
|
|
}
|
2023-06-11 19:18:58 +05:00
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
.reactor-container-inner {
|
|
|
|
|
box-shadow: 0px 0px 50px 15px $colour3, inset 0px 0px 50px 15px $colour3;
|
|
|
|
|
}
|
2023-06-11 19:18:58 +05:00
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
.e5_1 { animation: rotate 3s linear infinite; }
|
|
|
|
|
.e5_2 { animation: rotate_anti 2s linear infinite; }
|
|
|
|
|
.e5_3 { animation: rotate 2s linear infinite; }
|
|
|
|
|
.e5_4 { animation: rotate_anti 2s linear infinite; }
|
2023-06-11 19:18:58 +05:00
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
</style>
|