Javascript and css code for creating a sliding menu with rounded corner and vertical shape

Source: Internet
Author: User
Tags tagname
Tip: you can modify some code before running

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"><html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">Body {margin: 10px; padding: 10px;} a: link {text-decoration: none; color: blue} a: active {text-decoration: blink}: hover {text-decoration: underline; color: red} a: visited {text-decoration: none; color: green} body, td, div, span, li {font-size: 12px ;}. title01 ,. title02 {color: # 00b; font-weight: bold ;}# DoorP {width: 200px; height: 300px; padding: 0px; background: # FFFCF2 ;}. title01 {width: 100%; height: 25px; background: # FFFCF2; cursor: pointer ;}. title02 {width: 100%; height: 25px; background: # FFFCF2; cursor: pointer ;}. content {background: # FFFCF2; border-bottom: 2px solid # fff; overflow: hidden; color: #666; padding-left: 4px; padding-right: 4px; line-height: 18px ;}. www_zzjs_net {width: 202px ;}. www_zzjs_net. b1 ,. www_zzjs_net. b2 ,. www_zzjs_net. b3 ,. www_zzjs_net. b4 {font-size: 1px; display: block; background: # FFFCF2; overflow: hidden ;}. www_zzjs_net. b1 ,. www_zzjs_net. b2 ,. www_zzjs_net. b3 {height: 1px ;}. www_zzjs_net. b2 ,. www_zzjs_net. b3 ,. www_zzjs_net. b4 {background: # FFFCF2; border-left: 1px solid # C7BC98; border-right: 1px solid # C7BC98 ;}. www_zzjs_net. b1 {margin: 0 4px; background: # C7BC98 ;}. www_zzjs_net. b2 {margin: 0 2px; border-width: 0 2px ;}. www_zzjs_net. b3 {margin: 0 1px ;}. www_zzjs_net. b4 {height: 2px; margin: 0 ;}. www_zzjs_net. c1 {margin: 0 5px; background: # C7BC98 ;}. www_zzjs_net. c2 {margin: 0 3px; border-width: 0 2px ;}. www_zzjs_net. c3 {margin: 0 2px ;}. www_zzjs_net. c4 {height: 2px; margin: 0 1px ;}. www_zzjs_net. zzjs_net {display: block; background: transparent; border-left: 1px solid # C7BC98; border-right: 1px solid # C7BC98; font-size: 0.9em; text-align: justify ;}</style></head><body>Webmaster special effect network, with quality as the core, for practical purposes, to create a first-class webpage special effect station !, Special js effects for webmasters.<hr><!--欢迎来到站长特效网,我们网站收集大量高质量js特效,提供许多广告代码下载,网址:www.,zzjs@msn.com,用.net打造靓站--><div class="www_zzjs_net"> <b class="b1 c1"></b> <b class="b2 c2"></b> <b class="b3 c3"></b> <b class="b4 c4"></b> <div class="zzjs_net"><div id="DoorP"> <table> <tr> <td align="center">Webmaster special effect 1</td> </tr> </table> <div class="content" align="center">Webmaster special effects menu 1<br/>Webmaster special effects menu 2<br/>Webmaster special effects menu 3<br/> </div> <b class="b1"></b> <b class="b2"></b> <b class="b3"></b> <b class="b4"></b> <table> <tr> <td align="center">Webmaster Special Effect 2</td> </tr> </table><div class="content" align="center">Webmaster special effects menu 1<br/>Webmaster special effects menu 2<br/>Webmaster special effects menu 3<br/> </div> <b class="b1"></b> <b class="b2"></b> <b class="b3"></b> <b class="b4"></b> <table> <tr> <td align="center">Webmaster Special Effect 3</td> </tr> </table><div class="content" align="center">Webmaster special effects menu 1<br/>Webmaster special effects menu 2<br/>Webmaster special effects menu 3<br/> </div></div></div> <b class="b4 c4"></b> <b class="b3 c3"></b> <b class="b2 c2"></b> <b class="b1 c1"></b><script type="text/javascript">Var open = 2; var openState = new Array (); var closeState = new Array (); var dH = 220; function $ (id) {if (document. getElementById (id) {// Welcome to the special effect website of Webmaster. Our website is www ., it is easy to remember that zz webmaster and js are js special effects. This site collects a large amount of high-quality js code, and many advertisement code downloads. Return document. getElementById (id);} // Welcome to the website x special effect network. Our website is www ., it is easy to remember that zz webmaster and js are js special effects. This site collects a large amount of high-quality js code, and many advertisement code downloads. Else {alert ("not found! ") ;}} // Welcome to the special effect website of webmaster x. Our website is www ., it is easy to remember that zz webmaster and js are js special effects. This site collects a large amount of high-quality js code, and many advertisement code downloads. Function $ tag (id, tagName) {return $ (id ). getElementsByTagName (tagName)} function closeMe (Cid, Oid) {var h = parseInt (Ds [Cid]. style. height); // alert (h); if (h> 2) {h = h-Math. ceil (h/3); Ds [Cid]. style. height = h + "px";} // You are welcome to the webmaster xxiao network. Our website is www ., it is easy to remember that zz webmaster and js are js special effects. This site collects a large amount of high-quality js code, and many advertisement code downloads. Else {openMe (Oid); clearTimeout (closeState [Cid]); return false;} closeState [Cid] = setTimeout ("closeMe (" + Cid + ", "+ Oid +") ");} // Welcome to website special effect x. Our website is www ., it is easy to remember that zz webmaster and js are js special effects. This site collects a large amount of high-quality js code, and many advertisement code downloads. Function openMe (Oid) {var h = parseInt (Ds [Oid]. style. height); // alert (h); if (h <dH) {h = h + Math. ceil (dH-h)/3); Ds [Oid]. style. height = h + "px";} else {clearTimeout (openState [Oid]); return false;} openState [Oid] = setTimeout ("openMe (" + Oid + ") ") ;}// Welcome to the special effect website of the webmaster. Our website is w ww ., it is easy to remember that zz webmaster and js are js special effects. This site collects a large amount of high-quality js code, and many advertisement code downloads. Var Ds = $ tag ("DoorP", "div"); var Ts = $ tag ("DoorP", "table"); if (Ds. length! = Ts. length) {alert ("The number of titles and content is different! ");} // Welcome to the special effect website of the webmaster. Our website is ww w ., it is easy to remember that zz webmaster and js are js special effects. This site collects a large amount of high-quality js code, and many advertisement code downloads. For (var I = 0; I <Ds. length; I ++) {if (I = open) {Ds [I]. style. height = dH + "px"; Ts [I]. className = "title01";} else {Ds [I]. style. height = "0px"; Ts [I]. className = "title02";} // Welcome to the special effect website of Webmaster. Our website is www ., it is easy to remember that zz webmaster and js are js special effects. This site collects a large amount of high-quality js code, and many advertisement code downloads. Ts [I]. value = I; Ts [I]. onclick = function () {if (open = this. value) {return false;} Ts [open]. className = "title02"; Ts [this. value]. className = "title01"; for (var I = 0; I <openState. length; I ++) {clearTimeout (openState [I]); clearTimeout (closeState [I]);} // Welcome to the special effect website of Webmaster. Our website is www ., it is easy to remember that zz webmaster and js are js special effects. This site collects a large amount of high-quality js code, and many advertisement code downloads. CloseMe (open, this. value); // openMe (this. value); open = this. value ;}} // Welcome to the special effect website of the webmaster. Our website is www. zzj s.net is easy to remember. zz webmaster and js are js special effects. This site collects a large number of high-quality js codes and downloads many advertisement codes. Function showDiv (id) {Ds [id]. style. height = dH + "px"; Ds [open]. style. height = "0px"; open = id;} // Welcome to the special effect website of Webmaster. Our website is www. zzjs. ne t, very memorable, zz webmaster, js is js special effects, this site collects a large number of high-quality js code, there are a lot of ad code download.</script></div></body></html></td> </tr></table>
Tip: you can modify some code before running
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.