假设上面div的class为two,下面div的class为one。
1、下面的div文字的颜色设置成transparent。
.one{
color:transparent;
}
2、给上面的div设置背景色。
.two{
background-color: fff;
}
扩展资料:
两个div重合的方法:
父级元素绝对定位,子级元素相对定位。通过left、right、top、bottom实现子级在父级内任意定位
假设父级元素的class为con,子级元素的class为two。
.con{
position: relative;
}
.two{
position: absolute;
top:0;
}
效果图:
通过你的表述,我只能这么理解
本回答被提问者和网友采纳应该是要绝对定位
还要设置为绝对定位以及z-index
追答是的