gpt4 book ai didi

html - 无法将元素定位在左下角

转载 作者:太空宇宙 更新时间:2023-11-04 12:54:09 24 4
gpt4 key购买 nike

这应该是我正在构建的推特提要,类 src-twitter 基本上是发布者的时间戳和用户名,它应该在

的右下角,但是结果是就在引号的中间。

<div class="feed-bottom">
<div class="post1">
<p>
"You have brains in your head. You have feet in your shoes. You can steer yourself in any direction you choose. You're on your own, and you know what you know. And you are the guy who'll decide where to go." - Dr. Suess
</p>
<p class="src-twitter">
@username 5:55pm September 20, 2014
</p>
</div>
</div>

CSS:

   .post1{
position: relative;
}

.src-twitter {
color:#dfdfdf;
font-size: 12px;
position: absolute;
bottom: 0;
right: 0;
}

最佳答案

似乎不需要为此使用position,只需text-align 就可以了

更新的 CSS:

.src-twitter {
color:#dfdfdf;
font-size: 12px;
text-align:right;
}

Fiddle Demo

关于html - 无法将元素定位在左下角,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25960128/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com