解决办法
在显示层添加样式
onmouseover、
onmouseout
pointer-events: none;
function showDiv1(divID) { if (divID != null && divID != "") { var fugai1Show = document.getElementById(divID); if (fugai1Show.style.display == "none") { fugai1Show.style.display = "inline"; } } } function hiddenDiv1(divID) { if (divID != null && divID != "") { var fugai1Hidden = document.getElementById(divID); if (fugai1Hidden.style.display == "inline") { fugai1Hidden.style.display = "none"; } } }
<div class="service-detail" onmouseover="showDiv1('fugaiOne')" onmouseout="hiddenDiv1('fugaiOne')"> <img src="img/icon%20.png"> <p>Kelly Liu</p> <p>0086 15253733650</p> </div> <div style="display: none;" class="fugai fugai-one" id="fugaiOne"> <img src="img/icon-black.png"> <p>Sophie Sun</p> <img class="fugai-img" src="img/1.png"> <p>0086 15054886182</p> </div>