特效介绍

jquery图片提示插件,当鼠标移动到图片上,会显示该图片的大图,并且随着鼠标在图片上的移动,大图也会移动,并且在大图下面显示图片的alt属性,鼠标移开,大图消失。
使用方法
1.在head引入下面的代码:
<script src="https://5.jimth.com/download/jquery/jquery-1.8.3.min.js"></script>
<script src="jquery.imgTip.js"></script>
<style>
.tip{
position:absolute;
z-index:999px;
background:#999;
border:1px dashed #000;
line-height:23px;
font-size:12px;
color:#fff;
display:none;
}
img{ cursor:pointer;}
</style>
<script>
$(function(){
$("img").imgTip({ //选择器为img意味着页面所有的img图片都会使用这种效果,建议把需要显示大图的加一个相同的class选择器,这样区别于其他图片
x : 15, //大图距离鼠标的X坐标
y : 15 //大图距离鼠标的Y坐标
});
});
</script> 