ºÜÊǶ¯¸ÐµÄÒ»¿îjsÉìËõ¡¢¹Ø±Õ²Ëµ¥
´úÂë¼ò½é£º¶¯¸ÐÉìËõ¡¢¹Ø±ÕµÄJS+CSS²Ëµ¥£¬ÅäºÏºÚÉ«µÄ±³¾°£¬¿´ÉÏÈ¥ºÜ¿á£¬ÓеãÏñjQuery²å¼þ´òÔìµÄЧ¹û£¬µ«ËüÈ´ÊÇJavaSCript+CSSʵÏÖµÄŶ¡£
´úÂëÄÚÈÝ£º
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>ºÜÊǶ¯¸ÐµÄÒ»¿îjsÉìËõ¡¢¹Ø±Õ²Ëµ¥_ÍøÒ³´úÂëÕ¾(www.webdm.cn)</title> <script type=text/javascript> function $(d){ return document.getElementById(d); } function dsp(d,v){ if(v==undefined){ return d.style.display; }else{ d.style.display=v; } } function sh(d,v){ if(v==undefined){ if(dsp(d)!='none'&& dsp(d)!=''){ return d.offsetHeight; } viz = d.style.visibility; d.style.visibility = 'hidden'; o = dsp(d); dsp(d,'block'); r = parseInt(d.offsetHeight); dsp(d,o); d.style.visibility = viz; return r; }else{ d.style.height=v; } } s=7; t=10; function ct(d){ d = $(d); if(sh(d)>0){ v = Math.round(sh(d)/d.s); v = (v<1) ? 1 :v ; v = (sh(d)-v); sh(d,v+'px'); d.style.opacity = (v/d.maxh); d.style.filter= 'alpha(opacity='+(v*100/d.maxh)+');'; }else{ sh(d,0); dsp(d,'none'); clearInterval(d.t); } } function et(d){ d = $(d); if(sh(d)<d.maxh){ v = Math.round((d.maxh-sh(d))/d.s); v = (v<1) ? 1 :v ; v = (sh(d)+v); sh(d,v+'px'); d.style.opacity = (v/d.maxh); d.style.filter= 'alpha(opacity='+(v*100/d.maxh)+');'; }else{ sh(d,d.maxh); clearInterval(d.t); } } function cl(d){ if(dsp(d)=='block'){ clearInterval(d.t); d.t=setInterval('ct("'+d.id+'")',t); } } function ex(d){ if(dsp(d)=='none'){ dsp(d,'block'); d.style.height='0px'; clearInterval(d.t); d.t=setInterval('et("'+d.id+'")',t); } } function cc(n,v){ s=n.className.split(/\s+/); for(p=0;p<s.length;p++){ if(s[p]==v+n.tc){ s.splice(p,1); n.className=s.join(' '); break; } } } function Accordian(d,s,tc){ l=$(d).getElementsByTagName('div'); c=[]; for(i=0;i<l.length;i++){ h=l[i].id; if(h.substr(h.indexOf('-')+1,h.length)=='content'){c.push(h);} } sel=null; for(i=0;i<l.length;i++){ h=l[i].id; if(h.substr(h.indexOf('-')+1,h.length)=='header'){ d=$(h.substr(0,h.indexOf('-'))+'-content'); d.style.display='none'; d.style.overflow='hidden'; d.maxh =sh(d); d.s=(s==undefined)? 7 : s; h=$(h); h.tc=tc; h.c=c; h.onclick = function(){ for(i=0;i<this.c.length;i++){ cn=this.c[i]; n=cn.substr(0,cn.indexOf('-')); if((n+'-header')==this.id){ ex($(n+'-content')); n=$(n+'-header'); cc(n,'__'); n.className=n.className+' '+n.tc; }else{ cl($(n+'-content')); cc($(n+'-header'),''); } } } if(h.className.match(/selected+/)!=undefined){ sel=h;} } } if(sel!=undefined){sel.onClick();} } </script> <style type="text/css"> <!-- body{ font-size: 12px; color: #999999; background-color: #000000; font-family: Arial, Helvetica, sans-serif; text-transform: capitalize; } * { margin: 0px; padding: 0px; border: 0px;list-style:none;} #basic-accordian{ width:20%; z-index:2; margin-top: 2%; border-top-style: solid; border-top-color: #999999; border-bottom-style: solid; border-bottom-color: #666666; padding-top: 15px; padding-bottom: 15px; margin-bottom: 2%; }/*²Ëµ¥±³¾°*/ .accordion_headings{ padding:2px; color:#FFFFFF; cursor:pointer; font-weight:bold; font-size: 14px; line-height: 25px; letter-spacing: 1px; }/*²Ëµ¥·ÖÀàÐÐ*/ .accordion_headings:hover{ } .accordion_child{ padding-left: 20px; padding-bottom: 8px; } .accordion_child ul{} .accordion_child ul li{ font-size: 12px; display: block; line-height: 20px; display:block; } .accordion_child ul li a{ text-decoration: none; color: #666666; } .accordion_child ul li a:hover{ color: #FFFFFF; } .header_highlight{ background-color: #000000; color: #FF0099; }/*µ±Ç°ÏÔʾ²Ëµ¥·ÖÀàÑùʽ*/ /*²Ëµ¥Ñùʽ½áÊø*/ .main { margin-top: 2%; width: 96%; margin-right: auto; margin-left: auto; } --> </style> </head> <body onload="new Accordian('basic-accordian',5,'header_highlight');"> <div class="main"> <div id="basic-accordian" ><!--²Ëµ¥¿ªÊ¼--> <div id="test-header" class="accordion_headings" >ÍøÒ³´úÂëÕ¾</div> <div id="test-content"> <div class="accordion_child"> <ul><li><a href="/">ÍøÒ³ÌØЧ</a></li> <li><a href="http://www.webdm.cn">×îÐÂÔ´Âë</a></li> </ul> </div> </div> <div id="test1-header" class="accordion_headings" >ÍøÒ³ÌØЧ</div> <div id="test1-content"> <div class="accordion_child"> <ul><li><a href="//www.webdm.cn">CSS²¼¾Ö</a></li> <li><a href="http://www.webdm.cn">²Ëµ¥µ¼º½</a></li> <li><a href="/">»¬¶¯ÃÅ</a></li> </ul> </div></div> <div id="test7-header" class="accordion_headings" >ASPÔ´´úÂë</div> <div id="test7-content"> <div class="accordion_child"> <ul> <li><a href="http:">ÂÛ̳ÉçÇø</a></li> <li><a href="/">ÐÂÎÅÎÄÕÂ</a></li> <li><a href="/">ÁÄÌìÁôÑÔ</a></li> </ul> </div></div> <div id="test8-header" class="accordion_headings" >¿Í·þÖÐÐÄ</div> <div id="test8-content"> <div class="accordion_child"> <ul> <li><a href="http://www.webdm.cn">³£¼ûÎÊÌâ</a></li> <li><a href="/">ÔÚÏßÁôÑÔ</a></li> <li><a href="http://www.webdm.cn">ÁªÏµÎÒÃÇ</a></li> </ul> </div></div> </div><!--²Ëµ¥½áÊø--> </div><!--main½áÊø--> </body> </html> <br> <p><a href="http://www.webdm.cn">ÍøÒ³´úÂëÕ¾</a> - ×îרҵµÄ´úÂëÏÂÔØÍøÕ¾ - ÖÂÁ¦ÎªÖйúÕ¾³¤ÌṩÓÐÖÊÁ¿µÄ´úÂ룡</p>
ÍƼöÐÅÏ¢
- jqueryʵÏÖÍøվͼƬÀÁ¼ÓÔØ´úÂë
- jQuery Tooltips²å¼þ
- jQueryµÄ.bind()¡¢.live()ºÍ.delegate(....
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- Ä㲻ϲ»¶»ðºü£¬µ«ÓÖϲ»¶firebug£¬ÄǾ͸úÎÒÒ»ÆðÀ´ÔÚIEÉÏ....
- ¸ù¾ÝÏÔʾÆ÷·Ö±æÂʵ÷ÕûÒ³ÃæÏÔʾµÄJavascript½Å±¾
- jQuery дµÄ·ÂÐÂÀË΢²© ÏòϹö¶¯Ð§¹û¡¾×ªÔØ¡¿
- ͨÓõÄJqueryÑ¡ÔñÆ÷
- jQuery ½áºÏ Json Ìá½»Êý¾Ýµ½Webservice£¬....
- ×ÔÖÆjQueryÖÇÄÜÌáʾ²å¼þһö
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- js»ñÈ¡srcÖд«µÝµÄ²ÎÊý
- jqueryʵÏÖÍøվͼƬÀÁ¼ÓÔØ´úÂë
- ÈÃä¯ÀÀÆ÷ÆÁ±ÎµôJavaScriptµÄ³ö´íÌáʾ
- github²»ÄܼÓÔØcss¡¢js½â¾ö°ì·¨
- ÎÒÖªµÀµÄJavaScript -- Éè¼Æģʽ(ÇŽÓ)Ó¦ÓÃÖ® ¨C ....
- 15¸öÖµµÃ¿ª·¢ÈËÔ±¹Ø×¢µÄjQuery¿ª·¢¼¼ÇɺÍÐĵÃ
- dz̸JavascriptÃæÏò¶ÔÏó±à³Ì
- JS¼òµ¥¶¯»·â×°
- JavaScript³õѧÕßӦעÒâµÄÆ߸öϸ½Ú
- jQuery Tooltips²å¼þ
ÆÀÂÛ