gpt4 book ai didi

html - CSS:在包含内容的 Div 的右下角放置一个按钮/文本

转载 作者:太空宇宙 更新时间:2023-11-04 11:16:59 25 4
gpt4 key购买 nike

我想在 div 的右下角放置一些内容,我想到了这个:

#superDiv,
#childDiv {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
#childDiv {
z-index: 30;
float: right;
position: bottom;
}

这是我制作的 Plunk http://plnkr.co/edit/WaP5Pde7CXnAfnW3QybF?p=preview

缺少什么?

最佳答案

position: bottom 不存在。而且您不需要 float:right 因为您使用的是绝对位置。

#container {
width: 100%;
height: auto;
position: relative;
}
#superDiv {
width: 100%;
height: auto;
}
#childDiv {
position: absolute;
bottom: 10px; /* 5px margin-top + 5px margin-bottom */
right: 0;
}

希望对您有所帮助。

关于html - CSS:在包含内容的 Div 的右下角放置一个按钮/文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33129481/

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