<div class="container">
<input type="checkbox" />
<div>D I S C O</div>
<i>click above</i>
<span></span>
</div>
* {
margin: 0;
padding: 0;
font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
font-weight: 900;
}
.container {
position: relative;
display: flex;
height: 100vh;
align-items: center;
justify-content: center;
flex-direction: column;
i {
margin-top: 10px;
color: #333;
}
span {
width: 100%;
height: 100%;
background: #efefef;
position: absolute;
z-index: -1;
transition: all 0.5s ease;
}
div {
position: relative;
width: auto;
background: #1d1e21;
color: #555;
padding: 20px 40px;
display: flex;
justify-content: center;
align-items: center;
font-size: 46px;
cursor: pointer;
margin: 0 4px;
border-radius: 25px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
transition: all 0.5s ease;
}
}
input[type="checkbox"] {
position: absolute;
opacity: 0;
cursor: pointer;
height: 100%;
width: 100%;
z-index: 100;
&:checked {
~ {
div {
box-shadow: 0px 0px 5px rgba(255, 255, 255, 0.5);
color: yellow;
text-shadow: 0 0 15px yellow, 0 0 25px yellow;
animation: glow 5s linear infinite;
}
span {
background: #333;
}
}
}
}
@keyframes glow {
0% {
filter: hue-rotate(0deg);
}
100% {
filter: hue-rotate(360deg);
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.