本文介绍了禁用特定 div 上的悬停的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!
问题描述
当我将鼠标悬停在我的#icon div 上时,会出现一张图片.当我从#icon 移开鼠标时,图像消失了.
When I hover over my #icon div, an image appears. When I remove the mouse from #icon the image disappears.
问题
如果我将鼠标悬停在#icon 上,则将鼠标悬停在图像将出现的空间上,图像就会出现.我已经尝试过任何方法,所以我真的希望你能提供帮助.
If I hover over the space where the image will appear if I hover over #icon, the image appears. I've tried anything, so I really hope you can help.
我需要移除 #image-divs
HTML
<div id="box">
<div id="icons1">
<div id="image1"></div>
</div>
<div id="icons2">
<div id="image2"></div>
</div>
<div id="icons3">
<div id="image3"></div>
</div>
<div id="icons4">
<div id="image4"></div>
</div>
</div>
CSS 示例
#box #icons1 #billede1 {
height: 450px;
width: 1000px;
margin-left: -186%;
margin-top: 150px;
background-image: url(../html_css/billeder/1.jpeg);
background-position: center;
background-size: cover;
opacity: 0.0;
transition: opacity 0.5s ease-in-out;
-moz-transition: opacity 0.5s ease-in-out;
-webkit-transition: opacity 0.5s ease-in-out;
}
推荐答案
使用pointer-events:none
div{pointer-events:none}
div:hover{color:red;}
<div>Hover over me</div>
这篇关于禁用特定 div 上的悬停的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
The End




大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)