如何为缩略图悬停添加标题 - Bootstrap?
问题描述
我正在尝试将此缩略图悬停字幕插件用于引导程序.
您需要在图像上方放置另一个 div 并根据您的需要设置样式.
然后根据 Bootstraps 滑动等添加 hide() 或 show()
FIDDLE
HTML:
CSS:
JQuery:
编辑
上面的 Jquery 将显示和隐藏每个 .caption-btm.
但这会隐藏它被悬停的特定的:
FIDDLE
jquery:
I am trying to use this thumbnail hover caption plugin for bootstrap.
http://sevenx.de/demo/bootstrap/thumbnail-hover-caption.html
This is the code.
In this page, there is a part 'SlideIn/Out'.
When you hover on a thumbnail normally it slides in or out. This is what I want.
However, what I also need is when my cursor is not hover on thumbnail, there should be small caption at the bottom which I will write there a tagline.
So basically, default position will be small caption, when my mouse is over thumbnail it will slide in.
This is an exact example what I need. It can be viewed http://www.usatoday.com/news/
NO HOVER
HOVER
This is the jsfiddle page http://jsfiddle.net/g4j8B/
You need to place another div above the image and style it to your needs.
Then add the hide() or show() according to the Bootstraps sliding etc.
FIDDLE
HTML:
CSS:
JQuery:
EDIT
The above Jquery will show and hide every .caption-btm.
But this will hide the specific one that it's being hovered over:
FIDDLE
Jquery:
这篇关于如何为缩略图悬停添加标题 - Bootstrap?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!