The menu spread effect is very common in the web page. When you view web pages and the mouse are on the menu, the menu list will show automatically. When the mouse leaves, the menu list is not showed. This effect can make your web page clear. Especially, when the web site is used for governments, colleges, and big companies, the effect is more common. How can we mater this common effect? Now follow me step by step.
![]() |
Step1
Open your web page.
Step2
Select the text “front page”. Put “#” into the link textbox in the prosperities inspector, creating a blank link. Like the following picture showing:
Step3
Select the text “front page”, put the following codes into the right position. The codes are like this:
- id="link" onmouseleave=HideMenu() onmouseenter=ShowMenu()
Step4
Select the [insert]-[form]-[layer] command, inserting a layer. Set its properties in the properties inspector. Set its ID as mmuDIV, length as 18, and width as 71,and height as 46, and top as 159. then set its color as gold.
Step5
Select the layer, put the following codes in to the right position. The codes are like this:
- <div id="mnuDIV" onmouseleave=HideMenu() onmouseenter=ShowMenu()
- style="FILTER:progid:DXImageTransform.Microsoft.Stretch(stretchstyle=spin);
step6
set focus on the layer, and put the text. Then set the link to them. Like the following picture showing
Step7
Put the following codes into the section between <body> and </body>.
- <script Language="JavaScript">
- < !–
- function ShowMenu()
- {
- if (mnuDIV.style.visibility=="hidden")
- {
- mnuDIV.filters[0].apply();
- mnuDIV.style.visibility="visible";
- mnuDIV.filters[0].play();
- }
- }
- function HideMenu()
- {
- if(window.event.toElement.id!="mnuDIV" && window.event.toElement.id!="link")
- {
- mnuDIV.filters[0].stop();
- mnuDIV.style.visibility="hidden";
- }
- }
- //–>
- </script>
Step8
Save the document and preview the effect. The left picture is the effect of mouse leaving. And the right picture is the effect of mouse on. As the following picture showing:
Now the special effect of showing the menu is OK. let us look back it. firstly, we give the text a link and create a layer to show the lists. Then we write some codes to carry out the mouseleave and mouseon function. Have you mastered it?
For help, advice, tips and tricks, challenges, feel free to visit our
or Submit your good resource to share.
Reminder: Unless stated otherwise, all resources published on this site are NOT for commercial use. To use any resource from this site for commercial purposes, please contact the author.


