A Cool JS menu

Source: Internet
Author: User

Code encapsulated
Thank you for your support!
For more information, see the menu of some Flash sites,
I used javascript to simulate one, and the effect was Cool.

Write a simple instruction:
Step 1: materialized X-Menu class
Usage:
Var <entity variable>. new CoolMenuControl ()

Step 2: Create a menu project ---

Usage:
<Entity variable>. insertmenu (type, Html code, link URL, target)
Type: 0 indicates the menu title, 1 indicates the tree menu sub-project, and 2 indicates the horizontal Menu Sub-project.
Html code: Html code displayed on the menu
Link URL: Needless to say, URL or Javascript script
Target: empty by default, which is not opened on this page; "_ blank" indicates opening on a new page
For example:
CoolMenu2.insertmenu ("2", " Sina", "http://www.sina.com.cn/", "_ blank ")

Step 3: Create a menu ---

Usage:
<Object variable>. init (object variable name, border color, background color, sliding speed, and translucent background)
'Object variable name' must be the same as <object variable>
If the background color = "transparent" is completely transparent
For example:
CoolMenu1.init ("CoolMenu1", "#002000", "#38 FFff", 0.1, 15)
<Head> <meta http-equiv = "Content-Language" content = "zh-cn"> <style>. B {color = #000066; cursor: hand }. menu {font-family: Arial; cursor: Default; font-size: 12px; border: 1px #000000 solid; border-collapse: collapse; filter: progid: DXImageTransform. microsoft. gradient (gradienttype = 0, startcolorstr = # ffffff, endcolorstr = # dddddddd) progid: DXImageTransform. microsoft. shadow (direction = 135, color = # cccccc, strength = 3 );}. ht {font-weight: bold }</style> </pead> <body> </body>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.