I want to have an expanding radius starting at the center of the div , and not its beginning in the upper left corner of the div .
Imagine that the button has a pulsating circuit that goes out. This pulsating outline should start in the middle of the div and exit.
See an example here: https://jsbin.com/dinehoqaro/edit?html,css,output
You can see that the extension starts from the top left.
.circle { background-color: white; border: 1px solid red; border-radius: 50%; width: 50px; height: 50px; animation: pulse 1s infinte; -webkit-animation: pulse 1.2s infinite; } button { background-color: green; border: none; border-radius: 50%; width: 50px; height: 50px; } @-webkit-keyframes pulse { from { width: 50px; height: 50px; } to { width: 100px height: 100px; } } @keyframes pulse { from { width: 50px; height: 50px; } to { width: 100px; height: 100px; } }
<div class="circle"><button>click here</button></div>
source share