Positioning Page Elements with the Object Model: X, Y, and ZMove me!Case 1: This is a simple JavaScript animation using DOM elements instead of Netscape layers. At the end of the line, the <DIV> containing the trigger link is hidden by setting its display property to "none." Reload the page to reset the animation. Case 2: There are four <DIV>s here, each assigned the same X and Y coordinates so that they perfectly overlap. Layering is determined by their sequence in the markup: the first <DIV> goes at the bottom of the stack, the second above it, and so forth. Each <DIV> has an opaque background so that only one may be seen at a time. When the page loads, each is invisible because its visibility property is set to "hidden." Clicking on the link above shows each option in succession. The counter resets to zero after the fourth option, returning to the top of the cycle. |