网上最最流行的滑动门效果

王朝互联网·作者佚名  2011-12-21
窄屏简体版  字體: 小  |  中  |  大  |  超大  

新浪,网易这些大站的首页都使用了滑动门,占用空间少,网上很流行。

<!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>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<script>

function dj(i)

{

for(j=1;j<5;j++)

{

if(i==j){

document.getElementById("a"+j).className="li2";

document.getElementById("b"+j).style.display="";

}

else

{

document.getElementById("a"+j).className="li1";

document.getElementById("b"+j).style.display="none";

}

}

}

</script>

<title>网上流行的滑动门 </title>

<style>

/* CSS Document */

body { text-align: center; font-family:"宋体", arial;margin:0; padding:0; background: #FFF; font-size:12px; color:#000;}

div,form,img,ul,ol,li,dl,dt,dd {margin: 0; padding: 0; border: 0;}

h1,h2,h3,h4,h5,h6 { margin:0; padding:0;}

table,td,tr,th{font-size:12px;}

/* 链接颜色 */

a:link {color: #1f3a87; text-decoration:none;}

a:visited {color: #83006f;text-decoration:none;}

a:hover {color: #bc2931; text-decoration:underline;}

a:active {color: #bc2931;}

/* 滑动门 */

#c{width:243px; height:22px; margin:0 auto; font-size:12px; border:#94D5F3 1px solid;}

#c ul{ list-style:none; margin:0; padding:0;}

#c .li1 { width:60px; height:22px; display:block;border-bottom: #94D5F3 1px solid;border-right: #94D5F3 1px solid; background-color: #DBF2FD; float:left;}

#c .li2{ width:60px; height:22px; display:block; border-bottom:none; background-color: #fff; border-right: #94D5F3 1px solid;float:left;}

.txt{ width:243px; height:100px; padding:0;}

</style>

</head>

<body>

<div id="c">

<ul>

<li id=a1 class="li1"><a onclick="dj(1)" href="http://www.lampbk.cn/admin.php#">aaa</a></li>

<li id=a2 class="li2"><a onclick="dj(2)" href="http://www.lampbk.cn/admin.php#">bbb</a></li>

<li id=a3 class="li1"><a onclick="dj(3)" href="http://www.lampbk.cn/admin.php#">ccc</a></li>

<li id=a4 class="li1" style="border-right:none"><a onclick="dj(4)" href="http://www.lampbk.cn/admin.php#">ddd</a></li></ul>

<div id=b1 class="txt">aaaaaaaaaaaaaaaaaa</div>

<div id=b2 class="txt" style="display:none">http://www.buscx.cn/</div>

<div id=b3 class="txt" style="display:none">http://www.lampbk.cn/</div>

<div id=b4 class="txt" style="display:none">dddddddddddddd</div>

</div>

</body>

</html>

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝網路 版權所有 導航