There are several blocks, when you click on each of them, the clicked block begins to grow to the full width of the container, shifting other blocks proportionally. For example, when you click on the center box, the left box moves to the left off the screen, the top box moves up, and the right box moves to the right, until the center box fits the full width of the container. The shift to the right and down seems to work, but how to shift the left and top blocks off the screen?
Shifting elements up and left off screen in pure js
in JavaScript
Posted
There are several blocks, when you click on each of them, the clicked block begins to grow to the full width of the container, shifting other blocks proportionally. For example, when you click on the center box, the left box moves to the left off the screen, the top box moves up, and the right box moves to the right, until the center box fits the full width of the container. The shift to the right and down seems to work, but how to shift the left and top blocks off the screen?