.attention Please take touch
.container
- for (i = 0; i < 200; i++)
.trigger
.monitor
- for (i = 0; i < 10; i++)
.ball
View Compiled
body {
background: #000;
height: 100vh;
overflow: hidden;
cursor: pointer;
}
.attention {
position: absolute;
z-index: 999;
top: 50%;
left: 50%;
color: #fff;
font-size: 20px;
font-weight: light;
font-family: 'Quicksand', sans-serif;
letter-spacing: 10px;
white-space: nowrap;
transform: translate(-50%, -50%);
pointer-events: none;
animation:
attention 8000ms linear forwards,
fade 8000ms linear forwards;
}
.container {
position: relative;
display: grid;
grid-template-rows: repeat(10, 10vh);
grid-template-columns: repeat(20, 5vw);
}
.trigger {
@for $i from 1 through 10 {
@for $j from 1 through 20 {
$key: ($i - 1) * 20 + $j;
&:nth-child(#{$key}) {
&:hover ~ .monitor .ball {
top: ($i - 1) * 10% + 5%;
left: ($j - 1) * 5% + 2.5%;
}
}
}
}
}
.monitor {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #000;
pointer-events: none;
filter: blur(10px) contrast(30);
}
.ball {
position: absolute;
top: 50%;
left: 50%;
width: 300px;
height: 300px;
// background: #fff;
border-radius: 100%;
transform: translate(-50%, -50%);
transition-timing-function: cubic-bezier(0.330, 1.700, 0.510, 0.820);
mix-blend-mode: screen;
border: 10px solid #fff;
@for $i from 1 through 10 {
&:nth-child(#{$i}) {
width: $i * 50 + 20px;
height: $i * 50 + 20px;
transition-duration: 300ms + 200ms * $i;
animation: rotate random(600000) + 600000ms -1200000ms linear infinite;
// background: rgba(random(255), 255, 255, 1);
border-color: rgba(random(100) + 200, 255, 255, 1);
border-top-width: random(6) + 5px;
border-right-width: random(6) + 5px;
border-bottom-width: random(6) + 5px;
border-left-width: random(6) + 5px;
&::before {
width: random(20) + 10px;
height: random(20) + 10px;
animation: slide random(10000) + 10000ms -20000ms ease-in-out infinite alternate;
}
}
}
&::before {
content: '';
position: absolute;
background: #fff;
border-radius: 100%;
}
}
@keyframes rotate {
0% {
transform: translate(-50%, -50%) rotateZ(0deg);
}
100% {
transform: translate(-50%, -50%) rotateZ(360deg);
}
}
@keyframes slide {
0% {
transform: translateX(-150px);
}
100% {
transform: translateX(300px);
}
}
@keyframes attention {
0% {
letter-spacing: 10px;
}
100% {
letter-spacing: 40px;
}
}
@keyframes fade {
0% {
opacity: 0;
}
30% {
opacity: 1;
}
100% {
opacity: 0;
}
}
View Compiled
This Pen doesn't use any external JavaScript resources.