小编Let*_*e ヅ的帖子

如何将元素与div框的右侧对齐?

如何将元素与div框的右侧对齐?

我的 div

<div id="foo">
    <div id="tree">Some Text here</div>
</div>
Run Code Online (Sandbox Code Playgroud)

我的CSS

#foo {
    display: block;
    width: 500px;
    height: 500px;
    background: #5e5e5e;
}

#tree {
    width: 100px;
    height: 30px;
    background: #000000;
}
Run Code Online (Sandbox Code Playgroud)

我需要将放置在foo的右上角。

html css css-position

0
推荐指数
2
解决办法
4249
查看次数

标签 统计

css ×1

css-position ×1

html ×1