我有 2 个 div 向左浮动,因此它们将显示为内联
<div class==".container" style="width: 100%">
<div class="leftColumn" style="width: 50%; float:left">
test
</div>
<div class="rightColumn" style="width: 50%; float:left">
test
</div>
</div>
当屏幕低于 400 像素时,我希望 div 显示在彼此下方我当前的媒体查询
@media(max-width: 400)
{
.leftColumn{background-color: Red; float: none}
.rightColumn{background-color: Blue; float: right}
}
感谢任何能提供帮助的人