<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon carousel-control-right"></span></a>
我只想在用户将鼠标悬停在类 right carousel-control
上时才在右侧显示 glyphicon carousel-control-right
否则它应该被隐藏。这是怎么回事可能请帮助。
这是图片
最佳答案
将不透明度设置为 0,使其在视觉上隐藏但仍占用控制链接中的空间,然后在 :hover
.carousel-control-right {
opacity: 0;
}
.right.carousel-control:hover .carousel-control-right {
opacity: 1;
}
关于css - 在悬停右侧 carousel-control 时显示 glyphicon carousel-control-right,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42011981/