Learn Create Your Own Split Screen

Next Page

Here's a third rectangle: green and overlapping the red one.

See how the green rectangle is "in front of" the red rectangle?

Have a look at the code, and notice the order in which things are done.

Imagine you put a red card down on your desk, and then put a green one down so it overlapped. What would you see? Imagine if you did them in the reverse order.

Try changing the order of the rectangles and see which appears "in front of" the other.