悬停的Bootstrap旋转木马标题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了悬停的Bootstrap旋转木马标题相关的知识,希望对你有一定的参考价值。
我正在使用自举旋转木马,我只需要在悬停时显示标题
我知道我需要用CSS做点什么
<div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="item active">
<div class="row">
<div class="col-md-2">
<a href="#" class="thumbnail"><img class="img-responsive" src="pic.jpg" alt="Thumb11"> </a>
<div class="carousel-caption">
<h3 >Caption Text</h3>
<p >This is some text<p>
</div>
</div>
<div class="col-md-2"><a href="#" class="thumbnail"><img class="img-responsive" src="pic.jpg" alt="Thumb12"></a>
</div>
<div class="col-md-2"><a href="#" class="thumbnail"><img class="img-responsive" src="pic.jpg" alt="Thumb13"></a>
</div>
<div class="col-md-2"><a href="#" class="thumbnail"><img class="img-responsive" src="pic.jpg" alt="Thumb14"></a>
</div>
<div class="col-md-2"><a href="#" class="thumbnail"><img class="img-responsive" src="pic.jpg" alt="Thumb21"></a>
</div>
<div class="col-md-2"><a href="#" class="thumbnail"><img class="img-responsive" src="pic.jpg" alt="Thumb22"></a>
</div>
</div>
</div>
答案
$(document).ready(function()
$(".carousel-caption").hide();
$("img[alt=thumb11").on("hover",function()
$(".carousel-caption").fadeIn();
);
);
以上是关于悬停的Bootstrap旋转木马标题的主要内容,如果未能解决你的问题,请参考以下文章