[英]Left aligned caption for center aligned responsive image part 2
@partypete25 and whoever else may be can help! @ partypete25和其他任何人都可以帮忙!
Thanks for: 感谢:
Left aligned caption for center aligned responsive image 左对齐标题用于中心对齐的响应图像
and 和
https://jsfiddle.net/mk7on98L/19/ https://jsfiddle.net/mk7on98L/19/
It's working for me as well! 它也为我工作! However I cannot seem to have multiple lines of text underneath the image. 但是,我似乎在图像下面没有多行文本。 I tried to use a BR and add more lines of text but that errors out. 我尝试使用BR并添加更多行文本,但出现了错误。 Any suggestions on multiple lines of text with a BR at the end of each line of text? 关于多行文本,在每行文本的末尾带有BR的任何建议? Thanks! 谢谢!
I'm trying to use something like this: 我正在尝试使用这样的东西:
<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>
Regards, 问候,
I think you were making this two hard on yourself. 我认为您在这两个方面很难。 Just seperate the caption from the image. 只需将标题与图像分开即可。
<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.