我有一个这样的基本设置:
.container {
border:1px solid green;
}
Hello world! I don't want to overlap with the image. Hello world! I don't want to overlap with the image. Hello world! I don't want to overlap with the image.
我想将.child div与.container的右上角对齐.我想实现这个没有position:固定或一些margin-top:-px hack或更改任何HTML.
这是疯狂吗
到目前为止我已经尝试过
>我可以设置float:右边的.child div,但显然,第一个父div在上面.
>我可以设置位置:绝对到.child div,顶部:0和右:0,但它清晰地重叠.
>也许flex-Box疯狂是关键?虽然兼容性问题…