transition from one button to another

I want this effect but I am confuse how to achieve this? Do I need a separate div and then align the position?

Here is the codepen link
https://codepen.io/mozi47/pen/MWXQgbw
Was this page helpful?