2014-09-23 25 views
0

我試圖讓一些文字環繞放置在右邊的圖像(對於放置在左邊的圖像,它自動環繞)。任何想法如何做到這一點?這是我現在擁有的。如果圖像在右邊,我怎麼能將文字換行?

<div class="row clear"> 
    <div class="col-md-7 text-left"> 
      <div class="heading">Blash blah blsh</div> 
       <div class="feature-txt-body">This is a long piece of text that is so long that it needs to break into multiple lines. I am now writing some jibberish text and I have no idea what I am writing. I need to <b>only</b> focus on what's relevant to you. Now if you look at this line, it is not wrapping around the image.</div> 
      </div> 
    <div class="col-md-3"> 
    <div id="image"></div> 
    </div> 
</div> 

enter image description here

回答

2

您可以使用自舉的.pull-right類(這基本上只是一個浮動:權)來實現這一點沒有使用列。

你可以看到它在這個bootply工作:http://www.bootply.com/sc6dvO9rj3

HTML(整理了一下):

<div class="row"> 
    <img class="pull-right" width="100" height="100" src="..." /> 
    <h1>Blah blah blah</h1> 
    <p> 
     This is a long piece of text that is so long that it needs to break into multiple lines. I am now writing some jibberish text and I have no idea what I am writing. I need to <strong>only</strong> focus on what's relevant to you. Now if you look at this line, it is not wrapping around the image. 
    </p> 
</div> 
1

DEMO

<div class="row clear"> 
    <div class="col-md-7 text-left"> 
      <div class="heading">Blash blah blsh</div> 
       <div class="feature-txt-body"> 
    <div class="col-md-3"> 
    <div id="image" style="background:#000; width:200px; height:100px; float:right;"></div> 
    </div>This is a long piece of text that is so long that it needs to break into multiple lines. I am now writing some jibberish text and I have no idea what I am writing. I need to <b>only</b> focus on what's relevant to you. Now if you look at this line, it is not wrapping around the image.This is a long piece of text that is so long that it needs to break into multiple lines. I am now writing some jibberish text and I have no idea what I am writing. I need to <b>only</b> focus on what's relevant to you. Now if you look at this line, it is not wrapping around the image. This is a long piece of text that is so long that it needs to break into multiple lines. I am now writing some jibberish text and I have no idea what I am writing. I need to <b>only</b> focus on what's relevant to you. Now if you look at this line, it is not wrapping around the image</div> 
      </div> 

</div> 

文本格內放圖像將使其漂浮到文本的右側包裝方式

+0

感謝。不幸的是,這是行不通的。當我這樣做時,它進一步將圖像推向右側。 – Legend 2014-09-23 05:49:06

+0

是的,我看到在小提琴即時通訊試圖做到這一點,如果我得到另一種方式,我會在這裏發帖 – himanshu 2014-09-23 05:52:11

+0

我得到了答案,但不是一個傳統的方法 – himanshu 2014-09-23 05:57:49

相關問題