DIV CSS布局实例:CSS标签切换代码
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 5 <title>DIV CSS布局实例:CSS标签切换代码</title> 6 <style type="text/css"> 7 * {list-style-type:none; font-size:12px; text-decoration:none; margin:0; padding:0;} 8 a {behavior:url(xuxian.htc)} 9 .woaicss {width:438px; height:300px; overflow:hidden; margin:50px auto;} 10 .woaicss_title {width:438px; height:30px; background:#fff url(http://www.codefans.net/jscss/demoimg/201104/btn_bg.png) no-repeat; overflow:hidden;} 11 .woaicss_title li {display:block; float:left; margin:0 2px 0 0; display:inline; text-align:center;} 12 .woaicss_title li a {display:block; width:90px; heigth:30px; line-height:34px; color:#fff;} 13 .woaicss_title li a:hover {color:#f0f0f0; text-decoration:underline;} 14 .woaicss_title_bg1 {background-position:0 0;} 15 .woaicss_title_bg2 {background-position:0 -30px;} 16 .woaicss_title_bg3 {background-position:0 -60px;} 17 .woaicss_title_bg4 {background-position:0 -90px;} 18 .woaicss_con {display:block; width:438px; height:270px; background:url(http://www.codefans.net/jscss/demoimg/201104/con_bg.png) no-repeat 0 0; overflow:hidden;} 19 .woaicss_con ul {width:418px; height:250px; margin:12px auto;} 20 .woaicss_con li {width:418px; line-height:30px; margin:0 auto; white-space:nowrap; text-overflow:ellipsis; overflow: hidden;} 21 .woaicss_con li a {color:#03c;} 22 .woaicss_con li a:hover {color:#069; text-decoration:underline;} 23 .woaicss_copy {width:438px; margin:10px auto; text-align:center;} 24 .woaicss_copy a {color:#f00;} 25 </style> 26 </head> 27 28 <body> 29 30 <div class="woaicss"> 31 <script language="javascript"> 32 function woaicssq(num){ 33 for(var id = 1;id<=4;id++) 34 { 35 var MrJin="woaicss_con"+id; 36 if(id==num) 37 document.getElementById(MrJin).style.display="block"; 38 else 39 document.getElementById(MrJin).style.display="none"; 40 } 41 if(num==1) 42 document.getElementById("woaicsstitle").className="woaicss_title woaicss_title_bg1"; 43 if(num==2) 44 document.getElementById("woaicsstitle").className="woaicss_title woaicss_title_bg2"; 45 if(num==3) 46 document.getElementById("woaicsstitle").className="woaicss_title woaicss_title_bg3"; 47 if(num==4) 48 document.getElementById("woaicsstitle").className="woaicss_title woaicss_title_bg4"; 49 } 50 </script> 51 <ul class="woaicss_title woaicss_title_bg1" id="woaicsstitle"> 52 <li><a href="#" target="_blank" onmouseover="javascript:woaicssq(1)">ExtJS</a></li> 53 <li><a href="#" target="_blank" onmouseover="javascript:woaicssq(2)">Div教程</a></li> 54 <li><a href="#" target="_blank" onmouseover="javascript:woaicssq(3)">CSS布局实例</a></li> 55 <li><a href="#" target="_blank" onmouseover="javascript:woaicssq(4)">WEB标准化</a></li> 56 </ul> 57 <div class="woaicss_con" id="woaicss_con1" style="display:block;"> 58 <ul> 59 <li>·<a href="#" title="">Web Developer插件教程 CSS网页布局辅助设计利器!详细图文讲解!</a></li> 60 <li>·<a href="#" title="">CSS Templates 频道4月5日更新 增加模板22套</a></li> 61 <li>·<a href="#" title="">XHTML与CSS入门经典 从零开始系列教程!</a></li> 62 <li>·<a href="#" title="">DIV+CSS布局入门示例(目录)</a></li> 63 <li>·<a href="#" title="">CSS基础教程17篇 [翻译Htmldog]</a></li> 64 <li>·<a href="#" title="">DIV CSS布局实例:用css网站布局之十步实录!(目录) </a></li> 65 <li>·<a href="#" title="">WEB2.0标准教程 循序渐进十二天的基础学习!</a></li> 66 <li>·<a href="#" title="">Div+CSS 网页布局 教程!</a></li> 67 </ul> 68 </div> 69 <div class="woaicss_con" id="woaicss_con2" style="display:none;"> 70 <ul> 71 <li>·<a href="#" title="">DIV+CSS的XHTML代码结构浅谈 - 不要真DIV+CSS了</a></li> 72 <li>·<a href="#" title="">Div CSS教程:letter-spacing与word-spacing属性详解</a></li> 73 <li>·<a href="#" title="">margin外边距属性在inline内联元素中应用的测试!</a></li> 74 <li>·<a href="#" title="">Div CSS教程:block element与inline element元素详解 </a></li> 75 <li>·<a href="#" title="">DIV CSS实例教程:一款清新风格的CSS新闻列表制作</a></li> 76 <li>·<a href="#" title="">DIV CSS布局中如何组织样式表以便于简化、维护</a></li> 77 <li>·<a href="#" title="">DIV CSS编码中容易犯的一些错误 DIV CSS编码中容易犯的一些错误</a></li> 78 <li>·<a href="#" title="">如何将XHTML+CSS页面转换为打印机页面</a></li> 79 </ul> 80 </div> 81 <div class="woaicss_con" id="woaicss_con3" style="display:none;"> 82 <ul> 83 <li>·<a href="#" title="">IE6、IE7绝对定位与链接 问题研究</a></li> 84 <li>·<a href="#" title="">CSS实例:无懈可击的CSS圆角技术!</a></li> 85 <li>·<a href="#" title="">CSS布局教程:DIV+CSS三列式布局的实现方法</a></li> 86 <li>·<a href="#" title="">CSS基础实例:CSS实现带背景图片的文字链接的方法</a></li> 87 <li>·<a href="#" title="">Div+CSS实例:如何用CSS实现背景半透明效果</a></li> 88 <li>·<a href="#" title="">CSS实例:list-style-type在IE与FF中奇怪的现象解析</a></li> 89 <li>·<a href="#" title="">Div CSS布局关于分辨率与100%自适应问题的探讨!</a></li> 90 <li>·<a href="#" title="">CSS实例:如何让无空格的长字符在IE和FF下面实现自动换行?</a></li> 91 </ul> 92 </div> 93 <div class="woaicss_con" id="woaicss_con4" style="display:none;"> 94 <ul> 95 <li>·<a href="#" title="">CSS实用案例集(第2版) - CSS Cookbook</a></li> 96 <li>·<a href="#" title="">CSS禅意花园 读后感</a></li> 97 <li>·<a href="#" title="">CSS实战手册 公开发行 强烈推荐!2007年第17届Jolt 生产效率大奖</a></li> 98 <li>·<a href="#" title="">CSSer:你该如何发展,如何学习进步?</a></li> 99 <li>·<a href="#" title="">The ultimate webdesign usability checklist</a></li> 100 <li>·<a href="#" title="">Adobe Dreamweaver CS3 新功能简介</a></li> 101 <li>·<a href="#" title="">Web Standards与Web2.0应有所区别!</a></li> 102 <li>·<a href="#" title="">CSS教程:是什么使得CSS改善了WEB网站的可访问性</a></li> 103 </ul> 104 </div> 105 </div> 106 </body> 107 </html>
时间: 2024-11-05 04:47:56