Css 图像底部的媒体标题?
我试图创建一个图像的水平列表,并将图像标题放在图像下方(而不是上方)。这在Bootstrap 3中是可能的吗?(文档中没有看到与此相关的内容)Css 图像底部的媒体标题?,css,twitter-bootstrap,twitter-bootstrap-3,Css,Twitter Bootstrap,Twitter Bootstrap 3,我试图创建一个图像的水平列表,并将图像标题放在图像下方(而不是上方)。这在Bootstrap 3中是可能的吗?(文档中没有看到与此相关的内容) 1 二 三 试试这个: <div class="thumbnail"> <a href="/w3images/fjords.jpg"> <img src="/w3images/fjords.jpg" alt="Fjords" style="width:100%"> <d
1
二
三
试试这个:
<div class="thumbnail">
<a href="/w3images/fjords.jpg">
<img src="/w3images/fjords.jpg" alt="Fjords" style="width:100%">
<div class="caption">
<p>Lorem ipsum...</p>
</div>
</a>
</div>
试试这个:
div{
宽度:100px;
显示:内联块;
位置:相对位置;
}
img{
宽度:100%;
}
h5{
位置:绝对位置;
底部:-20px;
宽度:100%;
保证金:0;
文本对齐:居中;
背景:#CCC;
}
一
二
三
Wow-我从来都不知道bootstrap(或者可能认为它们只适用于迷你(标志性)图像)
<div class="thumbnail">
<a href="/w3images/fjords.jpg">
<img src="/w3images/fjords.jpg" alt="Fjords" style="width:100%">
<div class="caption">
<p>Lorem ipsum...</p>
</div>
</a>
</div>