当宽度> 959像素时,我要显示的是一列。 500px 宽度> 959像素 500px <宽度<959px 宽度<500px 我做错了什么? 感谢您的帮助.img-wi{
width:100%;
display: inline-block;
border:2px solid #13aff2;
margin-top:10px;
}
@media only screen and (max-width:959px) {
.left-w{
float:left;
width:49%
}
.right-w{
float:right;
width:49%
}}
.text-wi{
border-top:2px dashed #13aff2;
padding: 5px 0 0 20px;
}
@media only screen and (max-width:500px) {
.left-w{
float:none;
width:100%
}
.right-w{
float:none;
width:100%
}}
<div class="img-wi left-w">
<img class="aligncenter" src="/new-1.png" alt="" width="288" height="64">
<div class="text-wi">
<strong>AAAA</strong><br>
– A<br>– B<br>– C<br>
</div>
</div>
<div class="img-wi right-w">
<img class="aligncenter" src="/new-2.png" alt="" width="288" height="64">
<div class="text-wi"><strong>AAAA</strong><br>
– A<br>– B<br>– C<br>
</div></div>