Home > Blockchain >  Remove the logo text if its size is 660 pixels
Remove the logo text if its size is 660 pixels

Time:09-30

I have a logo, I want to remove the text of the logo, if the size width is 660 pixels.

Well when I strip out the text with CSS

@media (width <= 660px) {
  .LogoMonni-text {
    display: none;
  }
}

svg size remains the same. I want to change the value of the viewBox When removing the text from the logo.is it possible ?

codesandbox.io

CodePudding user response:

You should use media query like that:

@media (max-width: 660px) {
  .LogoMonni-text {
    display: none;
  }
}

CodePudding user response:

you can't use width >= 660px (use min and max)

@media (max-width:660px) {
      .LogoMonni-text {
        display: none;
      }
    }
  • Related