<button class="btn">
<span class="description">
Liquid
</span>
<div class="ocean"></div>
</button>
:root {
--dark-gray: #0C0E12;
--ocean: #1455C2;
--light: #fff;
}
body {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: var(--dark-gray);
}
.btn {
background: var(--ocean);
position: relative;
font-family: 'Raleway', sans-serif;
outline: none;
cursor: pointer;
border: 0;
padding: 20px 100px 20px 100px;
border-radius: 11px;
font-size: 24px;
overflow: hidden;
color: var(--light);
letter-spacing: 8px;
}
.description {
z-index: 2;
position: relative;
}
.ocean {
position: absolute;
left: 0;
top: -100px;
width: 100%;
height: 250px;
transition: 0.5s;
}
.ocean:before, .ocean:after {
content: '';
position: absolute;
width: 150%;
height: 200%;
top: 0;
left: 50%;
transform: translate(-50%, -85%);
}
.ocean:before {
border-radius: 45%;
background: rgba(20,20,20,1);
animation: moveOcean 5s linear infinite;
}
.ocean:after {
border-radius: 40%;
background: rgba(20,20,20,0.5);
animation: moveOcean 10s linear infinite;
}
@keyframes moveOcean {
0%{
transform: translate(-50%, -75%) rotate(0deg);
}
100%{
transform: translate(-50%, -75%) rotate(360deg);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.