问题
I am using Notepad++ with my CSS for HTML. I type in
@media only screen and (max-width: 1024px) {}
and in notepad++ it is not color coded like it is on here, which I find kind of worrying. If you need a picture to see what I mean, here you go:
The classes are color coded, but @media is not. Is this some incompatibility with NP++? or am I doing it wrong?
回答1:
You code is not incorrect. It's just that Notepad++ doesn't recognize media queries. But, that doesn't mean your code won't work on browsers/devices.
Don't worry about the color highlighting. You are doing it right.
Cheers!!!!
回答2:
Its just color highlighting , dont worry . But if this is uncomfotable , you can find patch / plugin which color for you media queries , Or simply switch yourself to PhpStorm or Sublime Text, its helping alot in coding if you using good IDE
来源:https://stackoverflow.com/questions/32900101/media-query-css-and-notepad-compatibility-issue