我有一个div应该包含文本并将其一幅图像揉成一团。
我不希望那个图像永远不会出现这个div。到底部。
该图像的最大值应为128像素。
但是,当div上方的文字太大时,图片应该变小。
我已经试过的东西,但这个棒图片浏览器的底部:将图片粘贴到div底部
<div style="width:250px; height:300px;background:#ff0000;">
<div style="background:#00ff00;">hello<br/>hello<br/>hello<br/>hello<br/>hello<br/>hello<br/>hello<br/>hello<br/>hello<br/>hello<br/>hello<br/>hello<br/></div>
<img src="http://www.blogcdn.com/www.joystiq.com/media/2008/07/ea.logo.round.490.jpg" style="position: absolute;
bottom: 0;
set left: 0;
height: 24px;"/>
</div>
更新
<div style="width:250px; height:300px;background:#ff0000;">
<div style="background:#00ff00;">hello<br/>hello<br/>hello<br/>hello<br/>hello<br/>
hello<br/>hello<br/>hello<br/>hello<br/>hello<br/>hjg<br/>jhg</div>
<img src="http://www.blogcdn.com/www.joystiq.com/media/2008/07/ea.logo.round.490.jpg" style="position: relative;bottom: 0;left: 0; height:100%;"/>
</div>
就像乔纳斯说,容器DIV必须具备的位置是:相对的;还有,为什么你把“set left:0;”?不知道它是否有错字。我从来没有见过任何人使用“设置左”,因为它应该是“左”,我也无法使用谷歌找到它。所以我建议将它从“左”改为“左” – Tom
更新了我的答案。请享用。 –