在引导程序3上将文字换行 [英] Wrap text around an image on bootstrap 3

查看:103
本文介绍了在引导程序3上将文字换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个问题,那就是将文字环绕在专栏上的图片周围. 我有一个模板,它正在运行多个页面.有些图像不够长,因此无法覆盖整个列... 我意识到它们位于2个不同的div中,但是如果有人对此有解决方案,请告诉我.

I came across an issue with wrapping the text around my image on my column. I have a template that It's running multiple pages. some of the images are not long enough so it wont be able to over the entire column... I realize that they are in 2 different divs but if anyone has a solution to this please let me know.

如果您阅读并了解问题所在,就会发现它不是重复的....

If you read and see what the issue is, you'll see its not a duplicate....

这是我的代码的样子

    <div class="row" data-sf-element="Row">
  <div id="contentPlaceholder_C002_Col00" class="sf_colsIn col-md-6" data-sf-element="Column 1">
    <div>
      <div>
        <h2>Contrary to popular belief, Lorem Ipsum is not simply r</h2>
        <p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during th</p>
        <p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during th</p>
      </div>
    </div>
  </div>
  <div id="contentPlaceholder_C002_Col01" class="col-md-6" data-sf-element="Column 2"> <img src="/images/default-source/careers/careers_1.jpg?sfvrsn=2" title="careers_1" alt="careers_1"> </div>
</div>

推荐答案

使用2列时,文本永远不会缠绕在图像周围.

When using 2 columns the text will never get wrapped around the image.

您应该将图像和文本放在一列中,并充分填充.然后将文本和图像包装在div中,然后将它们浮动到左侧.与此类似的东西(代码是示例,未经测试):

You should put the image and text in one column and give it full with. Then wrap the text and image in a div and float them to the left. Something in the line of this (code is an example and not tested):

<div class="col-md-12">
   <div class="pull-left"><img src="YourImage.png"/></div>
   <div class="pull-left">Your text goes here......</div>
</div>

您可能需要在图像上留出一些空白,以使文本不会粘在图像上

You might need some margin on the image so the text doesn't stick to close to the image

这篇关于在引导程序3上将文字换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆