This demo illustrates how both the content and the device can change size and the animation will always maintain perfect alignment for all 3 states of the animation:
click to resize me
I represent the width of your device
Use the slider to change the width of the device