0

我有一个问题,我决定在底部style.css我会做上面的所有样式

.searchMoveDown, .moveIcons{
    display:visible;
}

@media (max-width: 768){
   /* Hide the search and icons in the nav.*/
  .searchMoveDown, .moveIcons{
      display:none;
  }
}

当我将屏幕缩小到小于 768 像素时,当我清楚地说出这两个类时仍然可见,display: none;更糟糕的是,chrome 没有看到媒体查询。现在我决定在一个样式表中执行此操作,主要是因为引导程序就是这样做的,而且它似乎比获取两个样式表更干净。

我错过了什么还是....

太我这些不工作,也许我只是疯了。

4

2 回答 2

1

您在媒体查询中缺少 px 。

@media (max-width: 768px){
       /* Hide the search and icons in the nav.*/
      .searchMoveDown, .moveIcons{
          display:none;
      }
    }
于 2013-11-07T21:48:39.543 回答
0

您在查询中缺少单位!

@media (max-width: 768px){
   /* Hide the search and icons in the nav.*/
  .searchMoveDown, .moveIcons{
      display:none;
  }
}
于 2013-11-07T21:48:57.810 回答