How to implement animation blocks that are pressed to the right edge of the browser?

We have blocks (links) to certain anchors on the page, i.e. looks like page switches.

Example

.pages { position: fixed; right: 0; top: 50%; z-index: 2; } .pages a { display: block; text-decoration: none; background: #f8b10a; color: #000; /*padding: 11px 20px;*/ margin: 5px 0; width: 50px; height: 50px; text-align: center; box-sizing: content-box; } 

How to implement an animation of increasing the block to the left when hovering?

    1 answer 1

    Add margin will not work?

     .pages a:hover { margin-left: -40px; } 
    • Feel like an idiot. Damn head does not work by Friday evening ( - wkornilow