人人做人人澡人人爽欧美,国产主播一区二区,久久久精品五月天,羞羞视频在线观看免费

當(dāng)前位置:蘿卜系統(tǒng)下載站 > 技術(shù)開發(fā)教程 > 詳細頁面

25種風(fēng)格各異的菜單 (1)

25種風(fēng)格各異的菜單 (1)

更新時間:2021-02-16 文章作者:未知 信息來源:網(wǎng)絡(luò) 閱讀次數(shù):

25種風(fēng)格各異的菜單 (轉(zhuǎn) 1)


Step1:

  首先我們了解一下,Onmouse show and hide layer,這個是典型的DW帶的功能,相信大家都能做的出來。做好后,控制菜單的文字或者圖片中有些屬性:

onMouseOver="MM_showHideLayers('meun2','','show');" onMouseOut="MM_showHideLayers('meun2','','hide');"

  關(guān)鍵是當(dāng)我們的鼠標(biāo)移動到控制菜單的文字show and hide layer后,
移向菜單時候?qū)泳拖Я恕F鋵崳瑒酉履X筋,給div的屬性中加入

onMouseOver="MM_showHideLayers('meun2','','show');" onMouseOut="MM_showHideLayers('meun2','','hide');"

  就可以從控制菜單的文字或圖片移向菜單選擇了。
  Step2:

  現(xiàn)在看一下,Onmouse over后改變菜單中的CSS,其實這個也非常簡單,但不是用DW直接能做到的(起碼我不知道:P ):
先定義兩個不同的CSS
<STYLE type="text/css">
.td{border:1px solid #000000}
.td2{border:1px solid #336699;background-color:#FFFFFF}
</style>

  然后給表格中的TD添加Onmouse動作:

onMouseover="this.className='td2';" onMouseout="this.className='td'"

  記住哦,要事先給TD連個Class:class=td
做好了就是這樣:

<TD width=100% align=middle class=td onMouseover="this.className='td2';" onMouseout="this.className='td'">

  以上都是html和CSS的基礎(chǔ)。

  Step3:

  下面就是重要的部分了看一下head區(qū)該用到的js:

<script language="JavaScript">

function fadein(mytransition){
mytransition.innerHTML=''
if (cur!='x'){
mytransition.filters.revealTrans.Transition=cur
mytransition.filters.revealTrans.apply()
mytransition.innerHTML='<TABLE height=100 border=1 bordercolor=#336699 bgcolor=#FFFFCC cellPadding=0 cellSpacing=3 width=100%><TR><TD width=100% align=middle class=td onMouseover="this.className=\'td2\';" onMouseout="this.className=\'td\'"><a href="http://egadesk.com">ENIGMA DESK For icon</a></TD></TR><TR><TD width=100% align=middle class=td onMouseover="this.className=\'td2\';" onMouseout="this.className=\'td\'"><a href="http://egadesk.com">ENIGMA DESK For skin</a></TD></TR><TR><TD width=100% align=middle class=td onMouseover="this.className=\'td2\';" onMouseout="this.className=\'td\'"><a href="http://egadesk.com">ENIGMA DESK For image</a></TD></TR><TR><TD width=100% align=middle class=td onMouseover="this.className=\'td2\';" onMouseout="this.className=\'td\'"><a href="http://egadesk.com">ENIGMA DESK Basic BBS</a></TD></TR></TABLE>'
mytransition.filters.revealTrans.play()
}
else{
mytransition.filters.blendTrans.apply()
mytransition.innerHTML='<TABLE height=100 border=1 bordercolor=#336699 bgcolor=#FFFFCC cellPadding=0 cellSpacing=3 width=100%><TR><TD width=100% align=middle class=td onMouseover="this.className=\'td2\';" onMouseout="this.className=\'td\'"><a href="http://egadesk.com">ENIGMA DESK For icon</a></TD></TR><TR><TD width=100% align=middle class=td onMouseover="this.className=\'td2\';" onMouseout="this.className=\'td\'"><a href="http://egadesk.com">ENIGMA DESK For skin</a></TD></TR><TR><TD width=100% align=middle class=td onMouseover="this.className=\'td2\';" onMouseout="this.className=\'td\'"><a href="http://egadesk.com">ENIGMA DESK For image</a></TD></TR><TR><TD width=100% align=middle class=td onMouseover="this.className=\'td2\';" onMouseout="this.className=\'td\'"><a href="http://egadesk.com">ENIGMA DESK Basic BBS</a></TD></TR></TABLE>'
mytransition.filters.blendTrans.play()
}
}
</script>

body區(qū)的js:


<script language=JavaScript1.2>
<!--

function doit(mytransition){
if (event.srcElement.tagName=="SMALL"){
cur=event.srcElement.n
fadein(mytransition)
}
}

//-->
</script>

  注意到mytransition.innerHTML的部分了嗎?那就是要顯示在進行特效的div中的內(nèi)容,但這不是div,關(guān)于這段js的解釋,很簡單,我不說了:P。下面看一下div:

<div id=mytransition style="position:absolute; left:43px; top:169px; width:400px; height:100px; z-index:1; visibility: hidden;FILTER: revealTrans(duration=3,transition=0) blendTrans(duration=3);" onMouseOver="MM_showHideLayers('mytransition','','show');" onMouseOut="MM_showHideLayers('mytransition','','hide');"></div>



  看到了吧,id=mytransition 和mytransition的部分就是第一步中說的效果,可以讓鼠標(biāo)從控制菜單上移向菜單,而不是離開控制體而隱藏了菜單。

  FILTER: revealTrans(duration=3,transition=0) blendTrans(duration=3);的部分很重要,它設(shè)定了默認的變化方式。

  那么我們在看控制這個菜單的文字或者圖片:

<span style="CURSOR: hand;" onMouseOver="MM_showHideLayers('mytransition','','show');doit(mytransition);" onMouseOut="MM_showHideLayers('mytransition','','hide');">
 <small n="7">MEUN1</small></span>

  關(guān)于show hide layer部分前面也講了。看下紅色標(biāo)記,這個就是在onmouseover時候通過body的js部分開始執(zhí)行fadein(mytransition)

  那么還有這個綠色的代碼,這個才是真正控制菜單效果的地方,n中的7就是指第七種樣式,你可以從下面看到各種樣式的顯示方式,按順序從上到下依次為x、0-23共25種效果。ok!到此為止,就這些,那么我們把這些代碼組合一下,不就出來了這個具有25中特效的菜單了嗎~:),看最下面的整體代碼。

溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統(tǒng)下載排行

網(wǎng)站地圖xml | 網(wǎng)站地圖html
主站蜘蛛池模板: 鄱阳县| 甘孜| 博野县| 玛沁县| 运城市| 桦川县| 绥宁县| 崇阳县| 扎鲁特旗| 昌邑市| 阿拉善左旗| 正定县| 民乐县| 滕州市| 阜新| 汝阳县| 商都县| 那坡县| 塔城市| 滕州市| 福鼎市| 博湖县| 南汇区| 民县| 勐海县| 甘德县| 吉首市| 阳山县| 巴南区| 台东县| 彰化市| 宝山区| 普兰店市| 章丘市| 南江县| 枣阳市| 萝北县| 航空| 德保县| 收藏| 泰宁县|