Answer the question
In order to leave comments, you need to log in
Why is LogoMonniMobile svg not rendered at 736px wide?
This is my code: codesandbox.io
CSS
@media (width > 736px) {
#LogoMonni-mobile {
display: none;
}
}
@media (max-width <= 736px) {
#LogoMonni-pc {
display: none;
}
#LogoMonni-mobile {
display: block;
}
}
import { ReactComponent as LogoMonniPC } from "./logoMonniPC.svg";
import { ReactComponent as LogoMonniMobile } from "./LogoMonniMobile.svg";
import "./styles.css";
export default function App() {
return (
<div className={"LogoMonni"}>
<LogoMonniPC />
<LogoMonniMobile />
</div>
);
}
Answer the question
In order to leave comments, you need to log in
Because you are using incorrect media query syntax.
Instead of media (width > 736px) you need to write media (min-width: 737px)
Even the editor in codesandbox emphasizes this as an error for you.
Try reading the documentation https://developer.mozilla.org/ru/docs/Web/CSS/Medi...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question