Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图让我的 jCarousel 的箭头仅在我将鼠标悬停在容器上时显示(我将在同一页面中有多个容器)
但我什至不知道如何解决这个问题。
有人对如何做到这一点有任何提示吗?
这将不胜感激!
首先你必须默认隐藏你的箭头,所以在 CSS 中:
.arrow-class {display:none;}
然后使用 jquery 在您将鼠标悬停在图像上时显示
$(".image-class").hover(function(){ $(".arrow-class").show(); //this happens when you mouse in }, function(){ $(".arrow-class").hide(); //this happens when you mouse out });