我遇到了一个相当不寻常的问题。我为响应式布局编写了代码,它大部分都有效,但平板电脑布局在某种程度上与 PC/桌面布局混乱。我知道这是平板电脑布局,因为当我删除它时,PC 布局的一切都恢复正常。我使用媒体查询是什么导致这种情况发生?
以下是我使用的不同查询:
/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {}
/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {}
/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {}