我想在 div 中创建一个图像(col-sm-4 三次)。 我尝试在图像上使用垂直对齐底部,但它不起作用。 但它似乎没有用。 img 仍然没有走到底部 我的 CSS 是这样的。
.initiative-buttons-content-inner{
min-height: 180px;
position: relative;
}
img{
vertical-align: bottom;
}
这里是链接https://jsfiddle.net/2z4czqhu/
有人知道为什么它不起作用吗?
最佳答案
像这样
position: absolute;
bottom: 0;
https://jsfiddle.net/2z4czqhu/1/
读这个 https://css-tricks.com/absolute-positioning-inside-relative-positioning/
关于html - Bootstrap 上的垂直对齐底部图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39323744/