<style type="text/css">
ul{ width:400px; margin:0px auto; list-style:none; padding:0px;}
ul li{ width:100px; float:left; height:30px; line-height:30px; text-align:center; font-size:13px;}
ul li a{ background:#ff0000; display:block; text-decoration:none;}
ul li a:hover{ background:; text-decoration:underline;}
</style>
<ul> <li ><ahref="">问问首页</a></li>
<li><a href="#">问题库</a></li> <li><a href="#">问问之星</a></li> <li><a href="#">问问团队</a></li> </ul>
网页内的代码:
</table> <table width="896" height="40" border="0" align="center" background="军火/imgs/导航背景.gif"> <tr> <td align="center" class="zhmm" width="180" ><a href="首页.html" class="a"><p onMouseOver="xiala(0)">官方首页</p></a></td> <td align="center" class="zhmm" width="180" ><a href="#" class="a"><p onMouseOver="xiala(1)">热卖武器</p></a></td> <td align="center" class="zhmm" width="180" ><a href="#" class="a"><p onMouseOver="xiala(2)">热卖防具</p></a></td> <td align="center" class="zhmm" width="180" ><a href="#" class="a"><p onMouseOver="xiala(3)">客服交流</p></a></td> <td align="center" class="zhmm" width="180" ><a href="#" class="a"><p onMouseOver="xiala(4)" onClick="qingqing()">您的枪盒</p></a></td> </tr> </table>
<table width="100%" height="42" align="center"> <tr> <td> <div id="div1" style="color:#FF00FF; display:none"> <table width="900" height="32" align="center" class="xiala1" border="0"> <tr> <td align="center" width="225" height="32"><a href="#" class="b"><p onClick="qingqing()">亮丽匕首类</p></a></td><td width="225" height="32" align="center"><a href="#" class="b"><p onClick="qingqing()">精装手枪类</p></a></td><td width="225" height="32" align="center"><a href="#" class="b"><p onClick="qingqing()">华丽轻机枪</p></a></td><td width="222" height="32" align="center"><a href="#" class="b"><p onClick="qingqing()">超威重机枪</p></a></td></tr></table></div> <div id="div2" style="color:#0000FF; display:none"> <table width="900" height="32" align="center" class="xiala1" border="0"> <tr> <td align="center" width="180" height="32"><a href="#" class="b"><p onClick="qingqing()">防弹衣</p></a></td><td align="center" width="180" height="32"><a href="#" class="b"><p onClick="qingqing()">装甲车</p></a></td><td align="center" width="180" height="32"><a href="#" class="b"><p onClick="qingqing()">战斗机</p></a></td><td align="center" width="180" height="32"><a href="#" class="b"><p onClick="qingqing()">坦克类</p></a></td><td align="center" width="180" height="32"><a href="#" class="b"><p onClick="qingqing()">航母类</p></a></td></tr></table></div> <div id="div3" style="color:#0000FF; display:none"> <table width="900" height="32" align="center" class="xiala1" border="0"> <tr> <td align="center" width="450" height="32"><a href="#" class="b"><span onClick="xialaa(2)">需要联系我们</span></a></td> <td align="center" width="450" height="32"><a href="#" class="b"><span onClick="xialaa(3)">留下联系方式</span></a></td> </tr></table> </div> </tr> </table>
JS代码:
function xiala(num) { for(i=1;i<=4;i++) { var div=document.getElementById("div" + i); if(div == null) continue; if(i == num) { div.style.display="block"; }else { div.style.display="none"; } } } //下拉式导航及其链接1 function xialaa(num) { for(i=1;i<=100;i++) { var div=document.getElementById("divv" + i); if(div == null) continue; if(i == num) { div.style.display="block"; }else { div.style.display="none"; } } } //下拉式导航及其链接2
css代码:
td.zhmm{ color:#FFFFFF;} .zc{ color:#FF0000; font-family:隶书; text-align:center;} td.zhuce{ color:#FFFF99; font-family:"隶书"; font-size:20px;} td.tishi{ color:#66FF00; font-family:"新宋体"; font-size:14;} .biaoti{ color:#00FFFF; font-family: "华文新魏"; font-size:24px;} .abc{ color:#FFFFFF; font-family:elephant; font-size:18px;} a.a{ color:#999999; font-size:20px; text-decoration:none; font-weight:bold; font-family:"华文新魏";} a.a:hover{ color:#FFFF00; text-decoration:underline; font-size:24px} .xiala1{ color:#CCCCCC; font-family:"华文新魏"; font-size:18px; text-decoration:none} .zhuce55{ color:#999999; font-family:隶书; font-size:18px;} .zhuce66{ color:#FF0000; font-family:"华文新魏"; font-size:16px;} .dibiao{ font-family:"华文新魏"; font-size:16px; color:#666666} a.b{ color:#66FF33; font-family:"华文新魏"; font-size:18px; text-decoration:none} a.b:hover{ color:#FF66FF; text-decoration:underline; font-size:20;} a.c{ color:#FFFFFF; font-family:"华文新魏"; font-size:18px; text-decoration:none} a.c:hover{ color:#FF0000; text-decoration:underline; font-size:18;} .chenggong{ color:#FF99FF; font-family:隶书; font-size:18px} .zuixin{ color:red; font-family:隶书; font-size:18px}
效果:
鼠标移动上去后:
A400互联怎么样?A400互联是一家成立于2020年的商家,A400互联是云服务器网(yuntue.com)首次发布的云主机商家。本次A400互联给大家带来的是,全新上线的香港节点,cmi+cn2线路,全场香港产品7折优惠,优惠码0711,A400互联,只为给你提供更快,更稳,更实惠的套餐,香港节点上线cn2+cmi线路云服务器,37.8元/季/1H/1G/10M/300G,云上日子,你我共享。...
OneTechCloud发布了本月促销信息,全场VPS主机月付9折,季付8折,优惠后香港VPS月付25.2元起,美国CN2 GIA线路高防VPS月付31.5元起。这是一家2019年成立的国人主机商,提供VPS主机和独立服务器租用,产品数据中心包括美国洛杉矶和中国香港,Cera的机器,VPS基于KVM架构,采用SSD硬盘,其中美国洛杉矶回程CN2 GIA,可选高防。下面列出部分套餐配置信息。美国CN...
tmhhost为2021年暑假开启了全场大促销,全部都是高端线路的VPS,速度快有保障。美国洛杉矶CN2 GIA+200G高防、洛杉矶三网CN2 GIA、洛杉矶CERA机房CN2 GIA,日本软银(100M带宽)、香港BGP直连200M带宽、香港三网CN2 GIA、韩国双向CN2。本次活动结束于8月31日。官方网站:https://www.tmhhost.com8折优惠码:TMH-SUMMER日本...