If you want a specific effect, take a look at the code snippet provided below.
Here is the HTML:
<section id="button-container" class="section">
<div id="effect" class="button">
<span class="text">Button</span>
</div>
</section>
And the CSS:
body, html {
height: 100%;
width: 100%;
}
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}
.section {
float: left;
font-family: 'Helvetica', sans-serif;
height: 50%;
width: 50%;
display: flex;
-webkit-display: flex;
-webkit-align-items: center;
align-items: center;
justify-content: center;
-webkit-justify-content: center;
}
.button {
border: none;
cursor: pointer;
padding: 25px 50px;
border: solid 1px gray;
border-radius: 8px;
position: relative;
}
.button .text {
position: relative;
z-index: 100;
font-size: 2em;
}
#button-container {
background-color: #fff;
}
#button-container #effect {
background-color: #42b574;
overflow: hidden;
}
#button-container #effect .text {
color: #fff;
transition: all .5s linear;
-webkit-transition: all .5s linear;
}
#button-container #effect::after {
content: '';
position: absolute;
transition: top .5s ease-in .5s, width .5s ease-out, height .5s ease-out;
-webkit-transition: top .5s ease-in .5s, width .5s ease-out, height .5s ease-out;
left: 50%;
top: -50%;
transform: translate(-50%, -50%);
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #79ccf2;
}
#button-container #effect:hover .text {
color: #ffffff;
transition: color .5s linear .5s;
-webkit-transition: color .5s linear .5s;
}
#button-container #effect:hover::after {
transition: top .5s ease-in, width .5s ease-out .5s, height .5s ease-out .5s;
-webkit-transition: top .5s ease-in, width .5s ease-out .5s, height .5s ease-out .5s;
top: 50%;
width: 400px;
height: 400px;
}
To see the effect in action, check out the demo here