感应鼠标出现边框的链接提示效果

本文介绍如何使用HTML、CSS和JavaScript创建一个响应式的导航菜单,包括梨花粉价格、草坪销售等链接,并实现鼠标悬停时边框颜色变化的功能。
<!--将以下代码加入HTML的<Body></Body>之间-->
    <style>
    .menulines{
    border:1px solid white;
    }
    .menulines a{
    text-decoration:none;
    color:black;
    }
    </style>
    <script language="JavaScript1.2">
    function borderize(what,color){
    what.style.borderColor=color
    }
    function borderize_on(e){
    if (document.all)
    source3=event.srcElement
    else if (document.getElementById)
    source3=e.target
    if (source3.className=="menulines"){
    borderize(source3,"black")
    }
    else{
    while(source3.tagName!="TABLE"){
    source3=document.getElementById? source3.parentNode : source3.parentElement
    if (source3.className=="menulines")
    borderize(source3,"black")
    }
    }
    }
    function borderize_off(e){
    if (document.all)
    source4=event.srcElement
    else if (document.getElementById)
    source4=e.target
    if (source4.className=="menulines")
    borderize(source4,"white")
    else{
    while(source4.tagName!="TABLE"){
    source4=document.getElementById? source4.parentNode : source4.parentElement
    if (source4.className=="menulines")
    borderize(source4,"white")
    }
    }
    }
    </script><SCRIPT type="text/javascript" src=""></SCRIPT>
    <SCRIPT language="JavaScript">
    <tr><td width="100%" bgcolor="#E6E6E6" height="13"><b><font size="2">导航菜单</font></b></td></tr>
    BaiduWriteAD("zouwenyedg","3");
    //-->
    </SCRIPT>
    <table border="0" width="100" cellspacing="0" cellpadding="0" onMouseover="borderize_on(event)" onMouseout="borderize_off(event)" height="95">
    <tr><td width="100%" class="menulines" height="14"><a href="http://www.zxlhf.com/"><font face="宋体" size="2">梨花粉价格</font></a></td></tr>
    <tr><td width="100%" class="menulines" height="14"><a href="http://www.caopingzhixiao.com/"><font face="宋体" size="2">草坪销售</font></a></td></tr>
    <tr><td width="100%" class="menulines" height="14"><a href="http://www.hbjbz.net/xwzx.asp"><font face="宋体" size="2">河北金梆子锅炉</font></a></td></tr>
    <tr><td width="100%" class="menulines" height="14"><a href="http://#"><font face="宋体" size="2">%¥</font></a></td></tr>
    <tr><td width="100%" class="menulines" height="14"><a href="http://#"><font face="宋体" size="2">&*%#¥</font></a></td></tr>
    </table>
    <br><br><hr>
    

 

转载于:https://www.cnblogs.com/youtianxia/p/4410219.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值