IE 下与元素重叠的区域为 img(该元素在上img在下),且该元素无背景(background:none、transparent),无可见内容(如 display none,visibllity hidden,left:-9999px; ) ,则该区域无法触发鼠标事件
复制代码代码如下:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title>test</title>
<style>
.ad-gallery{
position: relative;
width: 400px;
height: 350px;
overflow: hidden;
}
.ad-gallery .ad-prev,.ad-gallery .ad-next{
position: relative;
display: inline-block;
*display: inline;
*zoom:1;
float: left;
width:200px;
height: 100%;
z-index:100;
background-image: url('about:blank'); /* IE ,与元素重叠的区域为 img(该元素在上img在下),且该元素无背景(background:none、transparent),无可见内容(如 display none,visibllity hidden,left:-9999px; ) ,则该区域无法触发鼠标事件 */
}
.ad-gallery .prevHandle ,.ad-gallery .nextHandle{
position:absolute;
left:0;
right: 0;
top: 0;
bottom: 0;
margin:auto;
*top:50%;
*left:50%;
*margin-left: -50px;
*margin-top: -75px;
width: 100px;
height: 150px;
line-height: 150px;
background: #313131;
font-size: 14px;
text-align: center;
color: #ddd;
background: #313131;
display: none;
/*visibility: hidden;*/
/*left:-9999px; */
}
.ad-gallery .ad-img{
position: absolute;
top:0;
left:0;
z-index: 0;
width: 100%;
height: 100%;
}
.ad-gallery .desc{
position: absolute;
left: 0px;
bottom: 0px;
margin:0;
width: 100%;
height: 50px;
line-height: 50px;
background: #313131;
color: #eee;
text-indent: 10px;
z-index: 99;
}
.opacity60{
*filter:alpha(opacity=60);/*IE6、7*/
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=60)"; /*IE8*/
opacity: 0.6;
}
</style>
</head>
<body>
<div id="gallery" class="ad-gallery">
<img class="ad-img" src="/UploadFiles/2021-03-30/2013118165025387.jpg"><div class="ad-prev"><div class="prevHandle opacity60">上一张</div></div>
<div class="ad-next"><div class="nextHandle opacity60">下一张</div></div>
<div class="desc opacity60">image description</div>
</div>
<!--test-->
<div style="position:relative;width:100px;height:111px;border:1px solid red;overflow:hidden;">
<img class="ad-img" width="100" height="50" src="/UploadFiles/2021-03-30/o_7_4c135bd08efea.jpg"><div style="position:absolute;left:0;top:0;width:111px;height:100px;border:1px solid green;" onmouseover="alert(1);"></div>
</div>
<script>
var gallery = document.getElementById("gallery");
var elmInGallery = gallery.getElementsByTagName("*");
var mouseover = function(event){
event = event||window.event;
var target = (event.srcElement||event.target);
console.log('============= event log ===============');
console.log('1. ',this.className,' | ',target.className,' | ',target==this?'eventSrc':'eventTraval');
if((/ad-prev|ad-next/).test(this.className)){
console.log('2. ','handle active');
this.getElementsByTagName("div")[0].style.display = "block";
}
};
for(var i=0;i<elmInGallery.length;i++){
elmInGallery[i].onmouseover = mouseover;
}
</script>
</body>
</html>
复制代码代码如下:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title>test</title>
<style>
.ad-gallery{
position: relative;
width: 400px;
height: 350px;
overflow: hidden;
}
.ad-gallery .ad-prev,.ad-gallery .ad-next{
position: relative;
display: inline-block;
*display: inline;
*zoom:1;
float: left;
width:200px;
height: 100%;
z-index:100;
background-image: url('about:blank'); /* IE ,与元素重叠的区域为 img(该元素在上img在下),且该元素无背景(background:none、transparent),无可见内容(如 display none,visibllity hidden,left:-9999px; ) ,则该区域无法触发鼠标事件 */
}
.ad-gallery .prevHandle ,.ad-gallery .nextHandle{
position:absolute;
left:0;
right: 0;
top: 0;
bottom: 0;
margin:auto;
*top:50%;
*left:50%;
*margin-left: -50px;
*margin-top: -75px;
width: 100px;
height: 150px;
line-height: 150px;
background: #313131;
font-size: 14px;
text-align: center;
color: #ddd;
background: #313131;
display: none;
/*visibility: hidden;*/
/*left:-9999px; */
}
.ad-gallery .ad-img{
position: absolute;
top:0;
left:0;
z-index: 0;
width: 100%;
height: 100%;
}
.ad-gallery .desc{
position: absolute;
left: 0px;
bottom: 0px;
margin:0;
width: 100%;
height: 50px;
line-height: 50px;
background: #313131;
color: #eee;
text-indent: 10px;
z-index: 99;
}
.opacity60{
*filter:alpha(opacity=60);/*IE6、7*/
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=60)"; /*IE8*/
opacity: 0.6;
}
</style>
</head>
<body>
<div id="gallery" class="ad-gallery">
<img class="ad-img" src="/UploadFiles/2021-03-30/2013118165025387.jpg"><div class="ad-prev"><div class="prevHandle opacity60">上一张</div></div>
<div class="ad-next"><div class="nextHandle opacity60">下一张</div></div>
<div class="desc opacity60">image description</div>
</div>
<!--test-->
<div style="position:relative;width:100px;height:111px;border:1px solid red;overflow:hidden;">
<img class="ad-img" width="100" height="50" src="/UploadFiles/2021-03-30/o_7_4c135bd08efea.jpg"><div style="position:absolute;left:0;top:0;width:111px;height:100px;border:1px solid green;" onmouseover="alert(1);"></div>
</div>
<script>
var gallery = document.getElementById("gallery");
var elmInGallery = gallery.getElementsByTagName("*");
var mouseover = function(event){
event = event||window.event;
var target = (event.srcElement||event.target);
console.log('============= event log ===============');
console.log('1. ',this.className,' | ',target.className,' | ',target==this?'eventSrc':'eventTraval');
if((/ad-prev|ad-next/).test(this.className)){
console.log('2. ','handle active');
this.getElementsByTagName("div")[0].style.display = "block";
}
};
for(var i=0;i<elmInGallery.length;i++){
elmInGallery[i].onmouseover = mouseover;
}
</script>
</body>
</html>
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?
更新日志
2024年11月19日
2024年11月19日
- 群星.2022-福茂巨星·时空之轮日本唱片志系列DISC2范晓萱-RAIN【福茂】【WAV+CUE】
- 王闻-《男人四十4》[正版CD低速原抓WAV+CUE]
- 青燕子-八只眼演唱组《爱心》[WAV+CUE]
- 祁露想着你的好》WAV+CUE
- 陈致逸《赴梦之约 游戏主题原声音乐》[FLAC/分轨][159.96MB]
- 贵族音乐《睡眠自然流水声 ASMR白噪音背景音》[320K/MP3][155.72MB]
- 贵族音乐《睡眠自然流水声 ASMR白噪音背景音》[FLAC/分轨][857.58MB]
- 朱昕嵘《琴意绵绵6N纯银SQCD》[WAV+CUE]
- 降央卓玛《草原情6N纯银SQCD》WAV+CUE
- 傲日格乐《黑马琴HQCD》[WAV+CUE]
- 群星.2022-福茂巨星·时空之轮日本唱片志系列DISC3范晓萱-自言自语【福茂】【WAV+CUE】
- 群星.2022-福茂巨星·时空之轮日本唱片志系列DISC4那英-白天不懂夜的黑【福茂】【WAV+CUE】
- 群星.2015-华丽上班族电影原声大碟【大右音乐】【WAV+CUE】
- 陈粒《乌有乡地图》[320K/MP3][21.81MB]
- 陈粒《乌有乡地图》[FLAC/分轨][398.39MB]