我玩浮动物,我注意到“浮动崩溃错误”不会出现在固定位置。这里是example。为什么浮动崩溃不会出现在固定位置
所以,我有两个div:
<body
<div class="static">
<img>
<p>text text text</p>
</div>
<div class="fixed">
<img>
<p>text text text</p>
</div>
</body>
先用静态的位置和第二固定:
.fixed, .static{
outline: 1px solid black;
width: 150px;
}
.fixed{
position: fixed;
left: 200px;
top: 200px;
}
img{
float: right;
background-color: green;
width: 100px;
height: 100px;
}
而且结果:
那么,为什么第二固定-div不需要像这样的东西0修复浮动崩溃?
如果我想要固定div与fl出现怎么办燕麦崩溃,错误? – mqklin