简体   繁体   English

显示:无作用

[英]display: none doesn't work

I have web app for making music from javascript. 我有用于通过javascript制作音乐的网络应用。 But I have problem with display: none of my .musicBox class. 但是我有display: none问题display: none我的.musicBoxdisplay: none存在。

Here are the index.html code with all important styles & scripts. 这是带有所有重要样式和脚本的index.html代码。

My index.html file on CodePen 我在CodePen上的index.html文件

  @media screen and (max-width: 520px) {
      .rotateDevice {
          display: block; 
      }
      .toneBox {
          display: none;
      }
  }

When I resize the window to under 520px width it will 'display: none' my color Boxes. 当我将窗口大小调整为520px ,它将“显示:无”我的颜色框。 But why it didn't? 但是为什么没有呢?

There is something missing above this media query. 此媒体查询上方缺少某些内容。

Remove the .a above it. 删除其上方的.a

try 尝试

.toneBox {
    visibility: hidden;
}

试试看,这可能会帮助您:

Visibility: none;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM