复制代码 代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>鼠标滑过遮罩高亮效果</title>
<style>
*{padding:0;margin:0;}
ul,li{list-style:none;}
.picshow{float:left;padding:4px 0;width:760px;position:relative;}
.picshow li{float:left;height:160px;width:190px;background:http://www.875.cn/000;opacity:0.9;}
.picshow li img{height:160px;width:190px;}
.picshow li a{display:block;}
</style>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery.js"><script type="text/javascript">
$(function() {
var conAry = $("[name=h_light]");
conAry.each(function(){
var $this = $(this);
var els = $("a", $this);
els.each(function(){
var el = $(this);
el.mouseover(function() {
els.css({ "opacity": 0.6});
el.animate({ "opacity": 0.9 });
});
});
$this.mouseout(function() {
els.css("opacity", 1);
});
});
});
</script>
</head>
<body>

<ul class="picshow" name="h_light">
<li><a href="http://www.875.cn/" target="_blank" ><img src="/UploadFiles/2021-04-02/1634016671.jpg"><li><a href="http://www.875.cn/" target="_blank" ><img src="/UploadFiles/2021-04-02/1634016671.jpg"><li><a href="http://www.875.cn/" target="_blank" ><img src="/UploadFiles/2021-04-02/1634016671.jpg"><li><a href="http://www.875.cn/" target="_blank" ><img src="/UploadFiles/2021-04-02/1634016671.jpg"><li><a href="http://www.875.cn/" target="_blank" ><img src="/UploadFiles/2021-04-02/1634016671.jpg"><li><a href="http://www.875.cn/" target="_blank" ><img src="/UploadFiles/2021-04-02/1634016671.jpg"><li><a href="http://www.875.cn/" target="_blank" ><img src="/UploadFiles/2021-04-02/1634016671.jpg"><li><a href="http://www.875.cn/" target="_blank" ><img src="/UploadFiles/2021-04-02/1634016671.jpg">
</ul>
</body>
</html>

效果图如下:
jQuery实现鼠标滑过遮罩并高亮显示效果
标签:
鼠标滑过,遮罩,高亮显示

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
评论“jQuery实现鼠标滑过遮罩并高亮显示效果”
暂无“jQuery实现鼠标滑过遮罩并高亮显示效果”评论...