将文本放在div的底部 [英] Put text at bottom of div
本文介绍了将文本放在div的底部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有4个DIV彼此相邻,它们都居中在屏幕中间。我在每个div有2个单词,但我不想要他们在顶部,我希望他们出现在div的右下角。
I have 4 DIV's right next to each other, and they're all centered in the middle of the screen. I have 2 words in each div, but I don't want them at the top, I want them to appear in the bottom right hand corner of the div. How can I do this?
推荐答案
将文本包含在 span
或类似的并使用以下CSS ...
Wrap the text in a span
or similar and use the following CSS...
.your-div {
position: relative;
}
.your-div span {
position: absolute;
bottom: 0;
right: 0;
}
这篇关于将文本放在div的底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文