Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 图像底部的媒体标题?_Css_Twitter Bootstrap_Twitter Bootstrap 3 - Fatal编程技术网

Css 图像底部的媒体标题?

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

我试图创建一个图像的水平列表,并将图像标题放在图像下方(而不是上方)。这在Bootstrap 3中是可能的吗?(文档中没有看到与此相关的内容)

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>