google material button
pure css
by John Doe
HTML
<div>
<button class="button" type="button">
<span>
submit
</span>
</button>
<button class="button" type="button">
<span>
submit
</span>
</button>
<button class="button" type="button">
<span>
submit
</span>
</button>
</div>
CSS
* {
box-sizing: border-box;
}
*::after,
*::before {
box-sizing: border-box;
}
.button {
position: relative;
background: currentColor;
border: 1px solid currentColor;
font-size: 1.1rem;
color: #4f93ce;
margin: 3rem 0;
padding: 0.75rem 3rem;
cursor: pointer;
transition: background-color 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
overflow: hidden;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
.button:hover {
color: #337ab7;
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.2);
}
.button span {
color: #fff;
position: relative;
z-index: 1;
}
.button::before {
content: '';
position: absolute;
background: #071017;
border: 50vh solid #1d4567;
width: 30vh;
height: 30vh;
border-radius: 50%;
display: block;
top: 50%;
left: 50%;
z-index: 0;
opacity: 1;
transform: translate(-50%, -50%) scale(0);
}
.button:active::before, .button:focus::before {
transition: transform 1.12s ease, opacity 0.28s ease 0.364s;
transform: translate(-50%, -50%) scale(1);
opacity: 0;
}
.button:focus {
outline: none;
}