2016-10-02 15 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"/> 
相关问题