简体   繁体   中英

display: none doesn't work

I have web app for making music from javascript. But I have problem with display: none of my .musicBox class.

Here are the index.html code with all important styles & scripts.

My index.html file on CodePen

  @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. But why it didn't?

There is something missing above this media query.

Remove the .a above it.

try

.toneBox {
    visibility: hidden;
}

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

Visibility: none;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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