如何将图像放在div的底部?
<body>
<div class="container">
<div class="row" style="background-color: yellow; height: 600px;">
<div class="col-md-6">
<img src="img.png" alt="alt">
</div>
<div class="col-md-6">
Lorem ipsum
</div>
</div>
</div>
</body>
由于
答案 0 :(得分:0)
解决方案是:
HTML:
<div class="col-md-6 myclass">
<img src="img.png" class="bottom" width="300">
</div>
CSS:
.bottom{
position:absolute;
bottom:0;
}
.myclass{
height: 100%;
position:relative;
}