dreamweaver| Tutorials | Web page
Behavior is a shortcut to implementing interaction on a Web page, Dreamweaver MX 2004 behavior places JavaScript code in a document to allow visitors to interact with Web pages, changing page actions or performing certain tasks in a variety of ways. A behavior is a combination of an event and an action that is triggered by the event.
Here we will learn the use of behavior. Now, give an example to illustrate. Look at the image below, and move the cursor over the picture. A section of other content (animation) is displayed on the right side of it. Please test with the mouse, and then we will analyze the process.
Please move your mouse over the flower to move it out
This is two behaviors: Act One: Move in + Show; Act Two: Move out + hide.
The event is: mouse movement and move out. The action is: Show and hide.
The specific actions are as follows:
1, insert a picture in the page, this example is the Chrysanthemum picture.
2, insert a layer in the page, paste into a few animation villain. The following figure:
In the layers panel, set the layer to hidden. Does not appear when the page is opened. Level board status, as shown below:
3, click the picture, open the Behavior Panel (Window menu > behavior). In the behavior panel press the "+" number, select the Display in the pop-up menu-hidden layer, the following figure:
Behavior is a shortcut to implementing interaction on a Web page, Dreamweaver MX 2004 behavior places JavaScript code in a document to allow visitors to interact with Web pages, changing page actions or performing certain tasks in a variety of ways. A behavior is a combination of an event and an action that is triggered by the event.
Here we will learn the use of behavior. Now, give an example to illustrate. Look at the image below, and move the cursor over the picture. A section of other content (animation) is displayed on the right side of it. Please test with the mouse, and then we will analyze the process.
Please move your mouse over the flower to move it out
This is two behaviors: Act One: Move in + Show; Act Two: Move out + hide.
The event is: mouse movement and move out. The action is: Show and hide.
The specific actions are as follows:
1, insert a picture in the page, this example is the Chrysanthemum picture.
2, insert a layer in the page, paste into a few animation villain. The following figure:
In the layers panel, set the layer to hidden. Does not appear when the page is opened. Level board status, as shown below:
3, click the picture, open the Behavior Panel (Window menu > behavior). In the behavior panel press the "+" number, select the Display in the pop-up menu-hidden layer, the following figure: