마우스 기능에 따라 DIV를 보여 주거나 사라지게하는 효과가있는 마우스를 만들고 싶습니다. 나는 이것을 성공적으로 끝냈지 만, 머무를 때 대신 div 안에 im이있을 때 mouseout 함수가 깜박 거린다.javascript mouseout function flickering
Heres는 내 샘플 코드 :
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Kow Your Face</title>
<style>
#face {
background-image: url(face.png);
width: 262px;
height: 262px;
}
#lefteye {
background-image: url(circle.png);
width: 28px;
height: 28px;
position: relative;
top: 69px;
left: 59px;
}
#righteye {
background-image: url(circle.png);
width: 28px;
height: 28px;
position: relative;
top: 41px;
left: 167px;
}
#mouth {
background-image: url(circle.png);
width: 28px;
height: 28px;
position: relative;
top: 84px;
left: 114px;
}
</style>
</head>
<body>
<div id="face">
<div id="lefteye" onMouseOver="getElementById('lefteye').style.visibility='hidden'; getElementById('lefteyedes').style.visibility='visible';" onMouseOut="getElementById('lefteye').style.visibility='visible'; getElementById('lefteyedes').style.visibility='hidden';">
</div>
<div id="righteye" onMouseOver="getElementById('righteye').style.visibility='hidden'; getElementById('righteyedes').style.visibility='visible';" onMouseOut="getElementById('righteye').style.visibility='visible'; getElementById('righteyedes').style.visibility='hidden';">
</div>
<div id="mouth" onMouseOver="getElementById('mouth').style.visibility='hidden'; getElementById('mouthdes').style.visibility='visible';" onMouseOut="getElementById('mouth').style.visibility='visible'; getElementById('mouthdes').style.visibility='hidden';">
</div>
</div>
<div id="lefteyedes" style="visibility: hidden;">
<p>Left Eye</p>
</div>
<div id="righteyedes" style="visibility: hidden;">
<p>Right Eye</p>
</div>
<div id="mouthdes" style="visibility: hidden;">
<p>Mouth</p>
</div>
</body>
</html>
어떤 mouseout 이벤트입니까? 그들 모두 또는 특히 –
마우스 이벤트 모두 –
20 개의 질문에 대해 유감입니다. 마우스 아웃 기능이 켜지고 꺼지는 것이 아니라, 특정 mouseout 이벤트 깜박임이 켜지거나 꺼지는 것입니다. 맞습니까? 마우스가 div 중 하나에서만 움직이거나 마우스가 div 중 하나에 고정되어있을 때 이런 현상이 발생합니까? –