2013-01-17 135 views

回答

2

將圖像左移並將overflow:hidden放在文本上以防止它進入圖像下方。

+0

謝謝...它顯示正確 – karthick

+0

如果人增加文本大小,此解決方案將截斷文本。 –

+0

@NeilMasters當高度固定時,它只會截斷文本。 – sandeep

0

使用這個圖片的CSS樣式

clear:both 
0

簡單浮動ususaly的伎倆

img { 
    flaot:left; 
} 
p { 
    flaot:left; 
} 

這甚至使得以addapt到圖像中的文本,所以如果文本長於圖像的高度,它會在它下面變形。

0
<p><img src="https://www.google.com/images/srpr/logo3w.png" style="float:left;padding-right:12px" width="280" />Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p> 
<br style="clear:both" /> 
<p>It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> 

測試這個。