我想設置div底部的按鈕位置。 div文本將以帖子形式發生變化,但按鈕應該保留在底部以顯示我的圖片。請幫助。 這是我的代碼:我想設置div底部的按鈕位置
「級=」 IMG響應功能IMG「> .... 更多問候 賽義夫穆爾希德
我想設置div底部的按鈕位置。 div文本將以帖子形式發生變化,但按鈕應該保留在底部以顯示我的圖片。請幫助。 這是我的代碼:我想設置div底部的按鈕位置
「級=」 IMG響應功能IMG「> .... 更多問候 賽義夫穆爾希德
你的意思是這樣的?
.feature-div {
height: 100px; /*these are not important*/
width: 100%;
border: solid 1px red;
position: relative; /*this is*/
}
button,
img {
position: absolute;
bottom: 0;
}
button {
/*float:right; will get overwritten*/
right: 0;
}
img {
height: 50px;
width: 50px;
background: green;
}
<div class="col-md-4">
<div class="feature-div">
<img src="post_images/<?php echo $r['p_img']; ?>" class="img-responsive feature-img">
<?php echo $b1; ?>....
<button class="btn-info" style="float:right;"><a href="#">Read More</a></button>
</div>
</div>
非常感謝你,先生。是的,正是我想 –
這裏有一些文章,可能會幫助你在未來的定位。 [css定位101](http://alistapart.com/article/css-positioning-101)[詳細css定位](http://learn.shayhowe.com/advanced-html-css/detailed-css-positioning/ )[treehouse](http://blog.teamtreehouse.com/css-positioning)[css-tricks](https://css-tricks.com/absolute-relative-fixed-positioining-how-do-they-differ /) – cocoa
它看起來像你想附加一個圖像,但它不顯示 – cocoa
非常感謝。 –