开发者

CSS3 Media Query Troubleshooting

开发者 https://www.devze.com 2023-03-03 03:58 出处:网络
My media queries were working, but now they\'re not. I missed the point where something went wrong. As I inspect html elements in Chrome\'s version of Firebug, it shows that the media query rules are

My media queries were working, but now they're not. I missed the point where something went wrong. As I inspect html elements in Chrome's version of Firebug, it shows that the media query rules are being overwritten by rules defined earlier in the compile process.

Can 开发者_JAVA技巧anyone spot the issue?

http://www.jezenthomas.co.uk/huang/


The syntax on your queries might be off. Try changing:

@media screen and max-width 650px {}

to

@media screen and (max-width:650px) {}

Also, your * selector is running rampant through the streets and obliterating all your padding and margin indiscriminately. See the answers to this question: (why) is the CSS star selector considered harmful?

0

精彩评论

暂无评论...
验证码 换一张
取 消