On Android and design system Material Design it is common to see this button they call Ripple Buttom . link
ButitisdonewithJSandmyintentionistodoitwithCSSonly.IsitpossibletodosuchaneffectwithCSSonly?
Noticethatwhenbtnisclickedittriggersthisrippleeffect...
OBS:Idonotneedtheeffecttohappenwheretheclickwasmade,itcanalwayshappenfromthecenterofthebuttonout.SoIthinkit'sonlypossibletodoitwithCSSinthiscase.
ThisiswhatIhavesofar:
.btn {
width: 200px;
height: 160px;
margin: auto;
background-color: #eee;
box-shadow: 0 0 3px 0 rgba(0, 0, 0, .5);
display: flex;
justify-content: center;
align-items: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
cursor: pointer;
transition: all 200ms linear;
}
.btn:hover {
background-color: #ddd;
}
<div class="btn">Meu Ripple</div>