메뉴 (img.b 및 img.a) 중첩에 2 개의 이미지 클래스가 있으며 img.b는 기본적으로 위에 놓여 있고 투명도는 0이고 img.a는 페이드 아웃해야합니다 다른 코드는 페이드인데 .. 코드와 마찬가지로 img.a는 페이드 인으로 남아 있습니다 (2 개의 클래스는 투명도를 가짐으로써 하나씩 볼 수 있습니다). 몇 가지 해결책을 시도했지만 모두 영향을 미쳤습니다. 함께 단추.이미지가 페이드 인/아웃
<script type='text/javascript'>
$(document).ready(function(){
$("img.b").hover(
function() {
$(this).stop().animate({"opacity": "1"}, "fast");
},
function() {
$(this).stop().animate({"opacity": "0"}, "fast");
});
});
</script>
img.a {
z-index: 1;
position:absolute;
}
img.b {
position:absolute;
opacity: 0;
z-index:10;
}
jQuery 1.9+ –
에서 삭제되었습니다. ['.mouseenter()'] (http://api.jquery.com/mouseenter/) 및 ['.mouseleave()'] (http : //api.jquery.com/mouseleave/) – Dom
실제 질문/문제는 내게 불분명하므로 질문을 편집 해주십시오. –