简体   繁体   English

Div 的堆栈相互叠加

[英]The Div's stack on top of each other

The second div stacks on top of the first div and the first div invisible How can i position it below the first div第二个 div 堆叠在第一个 div 的顶部,第一个 div 不可见 我怎么能在第一个 div 下面

 .shop { width: 100%; height: 1000px; background-color: #ffffff; position: relative; justify-content: center; display: flex; }.bell { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; position: relative; }
 <div class="shop"></div> <div class="bell"> <img src="bell.png" alt=""> </div>

Is this what you are trying to do?这是你想要做的吗? :) :)

 .shop { width: 100%; height: 1000px; background-color: #000; justify-content: center; display: flex; }.bell { background-color: red; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; } img{ width: 30%; }
 <div class="shop"></div> <div class="bell"> <img src="https://images.pexels.com/photos/1289845/pexels-photo-1289845.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" alt=""> </div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM