HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <p>Now let’s try to move the objects vertically.</p>
1 <p>Now let’s try to move the objects vertically.</p>
2 <p>To do this, we will use a function that is like a “horizontal” translateY:</p>
2 <p>To do this, we will use a function that is like a “horizontal” translateY:</p>
3 transform: translateY(-100px)<p>This function will move the object 100 pixels vertically up. Note that we use a negative transform value to move the object up.</p>
3 transform: translateY(-100px)<p>This function will move the object 100 pixels vertically up. Note that we use a negative transform value to move the object up.</p>
4 <p>As you already saw in the previous assignment, several transform functions can be applied to an object at the same time. In this case, functions are simply listed separated by spaces after the transform property name, for example:</p>
4 <p>As you already saw in the previous assignment, several transform functions can be applied to an object at the same time. In this case, functions are simply listed separated by spaces after the transform property name, for example:</p>
5 transform: translateY(-100px) translateX(100px)<p>This transform will move the object 100 pixels to the right and up along the coordinate axis.</p>
5 transform: translateY(-100px) translateX(100px)<p>This transform will move the object 100 pixels to the right and up along the coordinate axis.</p>
6 <p>Let’s try to move the magician through the air using the horizontal and vertical movement functions.</p>
6 <p>Let’s try to move the magician through the air using the horizontal and vertical movement functions.</p>
7 <p>And of course, we must not forget to read through the levitation spell so that the wizard is able to fly!</p>
7 <p>And of course, we must not forget to read through the levitation spell so that the wizard is able to fly!</p>