我想要实现的是,当您将鼠标悬停在图像上时,其不透明度将降低到一半。我一定在这里犯了一个明显的错误,但无法弄清楚到底是什么。任何提示将不胜感激。
<a href="#" id="right-button"><img class="arrow" src="http://placekitten.com/200/200" alt="right" /></a>
$('.arrow').hover(
function() {
$(this).find('img').fadeTo('slow', 0.5);
},
function() {
$(this).find('img').fadeTo('slow', 1);
}
);