Using Dynamic HTML and Layers
The three main components of DHTML are
- layers
- CSS (Cascading Style Sheets), and
- JavaScript
"Layers" is a Dreamweaver term. Layers are implemented via <div> tags, which logically divide a web page into sections. Layers have two interesting attributes:
- Visibility: this property allows you to hide the content of a layer and then trigger its appearance ehen the user performs an action on the screen.
- Z-index: layers can be stacked.
The simplest way to create a layer in Dreamweaver is to use Draw Layer from the Layout menu.
Dreamweaver can animate with Timelines. Images cannot move around the screen unless they are contained in a layer. To record an animation path:
- Turn off Prevent Overlaps in the Layers panel if you want images to be able to move over other layers.
- Select the layer you want to animate. A layer must be selected for the Record Path of Layer command to be active.
- Select the Record Path of Layer command under Modify | Timeline.
- Make sure the playback head in the Timelines panel is on frame one.
- Pick up the layer's move handle and drag the layer on the path you want. A dotted line marks the path.
- When you release the mouse button the path becomes a solid line.
Turn on cog_layer visibility | Turn off cog_layer visibility | Pop-up message |