繁体   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