[查看演示] 源码如下 ---------------------------------------------------------- <html>
<head>
<title>层的切换-www.51windows.Net</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF">
<STYLE type=TEXT/CSS>
#layer1 { FILTER: revealTrans(Duration=1.0,Transition=23) visibility:hide}
#layer2 { FILTER: revealTrans(Duration=1.0,Transition=23) visibility:hide}
</STYLE>
<script>
function set_menu(x)
{
if (x.style.visibility=="hidden")
{
x.filters.revealTrans.apply();
x.style.visibility="visible";
x.filters.revealTrans.play();
}
else{
x.filters.revealTrans.apply();
x.style.visibility="hidden" ;
x.filters.revealTrans.play();
}
}
</script>
<p OnClick="set_menu(layer1);set_menu(layer2)">点击</p>
<div id="layer1" style="position:absolute; width:200px; height:115px; background-color: #336699; layer-background-color: #33FFFF; border: 1px none #000000; left: 50; top: 50; visibility: visible"></div>
<div id="layer2" style="position:absolute; width:200px; height:115px; background-color: #FF9900; layer-background-color: #FF9900; border: 1px none #000000; left: 50; top: 50; visibility: hidden"></div>
</body>
</html>
<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代码" onClick= 'window.location = "view-source:" + window.location.href'></div> |