2016-10-02 18 views
0

如何顯示圖像底部的文字(另一個div元素)?如何在圖片底部顯示文字(另一個div元素)?

<style type="text/css"> 
    .right{ 
    float: left; 
    width: 60%; 
    padding-left: 5px; 
} 

.left{ 
    float: left; 
    width: 40%; 
    max-width: 303px; 
} 
    </style> 

<div class="left"> 
<img src="http://i.imgur.com/xCbC4o8.png"/> 
</div> 
<div class="right"> 
et’s start with a bit of background. How did you get into angel investing? I was one of the early folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy stuff! Where did you get the mone et’s start with a bit of background. How did you get into angel investing? I was one of the early folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders det’s start with a bit of background. How did you get into angel investing? I was one of the early folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy stuff! Where did you get the moneoing crazy stuff! Where did you get the mone 
et’s start with a bit of background. How did you get into angel investing? I was one of the early folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy stuff! Where did you get the mone 
</div> 

https://jsfiddle.net/u50z4zta/

當我測試的代碼,就這樣表示。在圖像的底部沒有顯示文本[見紅方]

http://i.imgur.com/YYVMRH3.jpg

我想表明在這樣的圖像底部的文本。 [見紅方]

http://i.imgur.com/jJ9eQ5g.jpg

我怎麼能這樣做?

+1

CSS編寫內聯,您可以把所有的內容到一個DIV用'寬度:100%'(沒有任何'float'屬性),讓你的形象'浮動:left'屬性。 –

+0

使用HTML5'

'和'
',其準確地用於此方法。你可以用CSS相應地設計這些語義(這個問題的答案) – Martin

回答

0

所以你看起來像這樣單LiveFiddle

.post{ 
 
    margin:25px 25px; 
 
} 
 
    
 

 
    img { 
 
     float: right; 
 
    }
<div class="post"> 
 
    <img src="http://i.imgur.com/xCbC4o8.png" /> 
 

 
    <div class="right"> 
 

 
    et’s start with a bit of background. How did you get into angel investing? I was one of the early folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. 
 
    Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy stuff! Where did you get the mone et’s start with a bit of background. How did you get into angel investing? I was one of the early folks at eBay and 
 
    by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders det’s start with a bit of 
 
    background. How did you get into angel investing? I was one of the early folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an 
 
    outlet for me to hang out with people I liked– startup founders doing crazy stuff! Where did you get the moneoing crazy stuff! Where did you get the mone et’s start with a bit of background. How did you get into angel investing? I was one of the early 
 
    folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy 
 
folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy 
 
folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy 
 
folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy 
 
folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy 
 
folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy 
 
    stuff! Where did you get the mone 
 
    </div> 
 
</div>

0

東西只是刪除所有的div和簡單地添加float:leftimg

img {float:left}
<img src="http://i.imgur.com/xCbC4o8.png"/> 
 

 
et’s start with a bit of background. How did you get into angel investing? I was one of the early folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy stuff! Where did you get the mone et’s start with a bit of background. How did you get into angel investing? I was one of the early folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders det’s start with a bit of background. How did you get into angel investing? I was one of the early folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy stuff! Where did you get the moneoing crazy stuff! Where did you get the mone 
 
et’s start with a bit of background. How did you get into angel investing? I was one of the early folks at eBay and by 1999 it was completely overrun by consultants from McKinsey, Bain and BCG. It went from being a cool fun startup to an MBA factory. Angel investing was an outlet for me to hang out with people I liked– startup founders doing crazy stuff! Where did you get the mone

或者沒有在HTML

<img style="float:left" src="http://i.imgur.com/xCbC4o8.png"/> 
相關問題