<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}
效果:
鼠标移动上去后:
卢森堡商家gcorelabs是个全球数据中心集大成的运营者,不但提供超过32个数据中心的VPS、13个数据中心的cloud(云服务器)、超过44个数据中心的独立服务器,还提供超过100个数据中心节点的CDN业务。CDN的总带宽容量超过50Tbps,支持免费测试! Gcorelabs根据业务分,有2套后台,分别是: CDN、流媒体平台、DDoS高防业务、块存储、cloud云服务器、裸金属服务器...
ZJI怎么样?ZJI是一家成立于2011年的商家,原名维翔主机,主要从事独立服务器产品销售,目前主打中国香港、日本、美国独立服务器产品,是一个稳定、靠谱的老牌商家。详情如下:月付/年付优惠码:zji??下物理服务器/VDS/虚拟主机空间订单八折终身优惠(长期有效)一、ZJI官网点击直达香港葵湾特惠B型 CPU:E5-2650L核心:6核12线程内存:16GB硬盘:480GB SSD带宽:5Mbps...
BGPTO是一家成立于2017年的国人主机商,从商家背景上是国内的K总和有其他投资者共同创办的商家,主营是独立服务器业务。数据中心包括美国洛杉矶Cera、新加坡、日本大阪和香港数据中心的服务器。商家对所销售服务器产品拥有自主硬件和IP资源,支持Linux和Windows。这个月,有看到商家BGPTO日本和新加坡机房独服正进行优惠促销,折扣最低65折。第一、商家机房优惠券码这次商家的活动机房是新加坡...