簡體   English   中英

中心對齊的響應圖像第2部分的左對齊標題

[英]Left aligned caption for center aligned responsive image part 2

@ partypete25和其他任何人都可以幫忙!

感謝:

左對齊標題用於中心對齊的響應圖像

https://jsfiddle.net/mk7on98L/19/

它也為我工作! 但是,我似乎在圖像下面沒有多行文本。 我嘗試使用BR並添加更多行文本,但出現了錯誤。 關於多行文本,在每行文本的末尾帶有BR的任何建議? 謝謝!

我正在嘗試使用這樣的東西:

<div class="container">
  <div class="row">
    <div class="col-xs-12">
      <span class="text-center center-block" style="max-width:100%">
        <span data-caption="line 1 of text <br> line 2 of text <br> line 3 of text" class="img-wrapper text-left">
          <img class="img-responsive" src="http://placehold.it/350x150">
        </span>
      </span>
    </div>
  </div>
</div>

問候,

我認為您在這兩個方面很難。 只需將標題與圖像分開即可。

<div class="container">
  <div class="row">
    <div class="col-xs-12">
      <span style="width:100%; margin:0 auto;">
          <img class="img-responsive" src="http://placehold.it/350x150">
      </span>
      <span class="caption">line 1 of text <br> line 2 of text <br> line 3  of text</span>
    </div>
  </div>
</div>

對於多行,您需要在.img-wrapper上指定寬度

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM