1

I was only introduced to media queries yesterday while researching building my mobile optimized pages. I have found that contrary to my initial interpretation a media query directs to a stylesheet that is used in addition to and overrides the existing stylesheet.

Is that right? Is there a way to tell the visitors browser to ignore the original stylesheet and just use the one for mobile?

Here is existing code:

<link href="styles_mobile.css" media="screen and (max-device-width: 480px)" type="text/css" rel="stylesheet">

<link type="text/css" href="styles.css" rel="stylesheet">
4

1 回答 1

3

这样做是完全可以接受的。

于 2012-05-14T17:05:04.230 回答