?? 實例8.漸隱菜單.html
字號:
<head>
<style>
<!--
#iewrap{
position:relative;
height:30px
}
#iewrap2{
position:absolute
}
#dropmenu03{
filter:revealTrans(Duration=0.5,Transition=12)
visibility:hide
}
a:hover { color: #FF0000}
body { font-family: "宋體"; font-size: 9pt; text-decoration: none}
a { font-family: "宋體"; font-size: 9pt; text-decoration: none}
-->
</style>
</head>
<body>
<layer id="dropmenu01" height=35px>
<layer id="dropmenu02" visibility=show>
<span id="iewrap">
<input type=button id="iewrap2" value="國內(nèi)網(wǎng)站導航" onClick="dropit2();" style="background-color:#cccccc;border:1px solid black;">
</span>
</layer>
</layer>
<script language="JavaScript">
<!--
var selection=new Array() // 定義鏈接數(shù)組
selection[0]='<a href="http://www.sina.com.cn">新浪網(wǎng)</a><br>'
selection[1]='<a href="http://www.sohu.com">搜狐</a><br>'
selection[2]='<a href="http://www.163.com">網(wǎng)易</a><br>'
selection[3]='<a href="http://www.yahoo.com.cn">雅虎</a><br>'
selection[4]='<a href="http://www.china.com">中華網(wǎng)</a>'
function dropit2(){
if (document.all){
dropmenu03.style.left=document.body.scrollLeft+event.clientX-event.offsetX-4 // 菜單顯示的位置
dropmenu03.style.top=document.body.scrollTop+event.clientY-event.offsetY+17 // 菜單顯示的位置
if (dropmenu03.style.visibility=="hidden"){ // 當菜單隱藏時
dropmenu03.filters.revealTrans.apply() // 應用效果
dropmenu03.style.visibility="visible" // 顯示圖層
dropmenu03.filters.revealTrans.play() // 設(shè)置播放
}
else{
hidemenu() // 隱藏圖層
}
}
}
function hidemenu(){
dropmenu03.filters.revealTrans.stop()
dropmenu03.style.visibility="hidden"
}
//-->
</script>
<div id="dropmenu03" style="position:absolute;left:0;top:0;layer-background-color:#cccccc;background-color:#cccccc;width:115;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript">
<!--
if (document.all) // 判斷IE瀏覽器
dropmenu03.style.padding='4px'
for (i=0;i<selection.length;i++) // 循環(huán)鏈接數(shù)組
document.write(selection[i]) // 寫入鏈接信息
//-->
</script>
</div>
</body>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -