私はこの例を持っています:http://jsfiddle.net/WkpL9/
HTML:
<div class="span2">
<div class="image-container">
<img alt="" src="http://placehold.it/150x120"/>
<p>asdadsadasdasdsadasdasdasdasdsadsad</p>
</div>
</div>
CSS:
.image-container {
position: relative;
margin-left: auto;
margin-right: auto;
width: 100%;
}
.image-container img {
max-height: 150px;
}
.image-container p {
white-space: nowrap;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
position: absolute;
bottom: 0px;
}
画像のキャプションを次のようにします。1。画像の上(最上層)に配置します。2.画像の下部に垂直に配置されます。3.省略記号付き。4.ラッピングdivから抜け出しません。
これは可能ですか?
私はtwitterブートストラップを使用しています。