js实现鼠标悬浮给图片加边框的方法
本文实例讲述了js实现鼠标悬浮给图片加边框的方法。分享给大家供大家参考。具体实现方法如下:
html代码:
<divclass="T-s-lfl"> <ahref=""class="a1"> <imgsrc="images/11.jpg"width="234"height="368"/> </a><ahref=""class="a2"> <imgsrc="images/11.jpg"/> </a><ahref=""class="a3"> <imgsrc="images/11.jpg"/> </a> </div>
js代码:
<scriptsrc="js/jquery-1.9.1.min.js"type="text/javascript"></script>
<scriptsrc="js/jquery.insetborder.js"type="text/javascript"></script>
<scripttype="text/javascript">
$(document).ready(function(){
//border
$(".T-s-la.a1").borderEffect();
$(".a1").borderEffect();
$(".T-s-la.a2").borderEffect({borderColor:'#e80484'});
$(".T-s-la.a3").borderEffect({borderColor:'#7b7b7b',speed:300,borderWidth:10});
});
</script>
css代码:
.T-s-la{background:url(images/download.png)no-repeat-10px20px#fff;}
.T-s-l{width:952px;overflow:hidden;}
.T-s-la{float:left;width:234px;height:368px;margin:019px17px0;font-size:0;overflow:hidden;}
希望本文所述对大家的javascript程序设计有所帮助。
热门推荐
10 儿子立冬祝福语简短独特
11 对当兵的祝福语简短
12 侄儿高考试祝福语简短
13 伴郎红包祝福语朋友简短
14 媳妇生日简短祝福语朋友
15 公司年会祝福语简短最好
16 元旦感恩祝福语简短大全
17 红包祝福语简短10字
18 周六早晨祝福语简短