Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不知道这是否可能,但如果是的话,它会让一切变得容易得多。
所以,我有 2 个 div,div1 和 div2。div1部分被div2覆盖,如下图
但是,我希望div2在背景之下,如下图
这有可能吗?
这是您可以使用的解决方案溢出:隐藏
小提琴
.red { width:80px; height:80px; background:red; border-radius:80px; overflow:hidden; position:relative; } .green { width:80px; height:80px; background:green; border-radius:80px; overflow:hidden; position:absolute; left:60% }