HTML and CSS Reference
In-Depth Information
These are known as media queries. All three of
the previous examples are constraining the
styles they reference or include to only apply
to print media. In CSS2 you could also restrict
to screen, aural, braille, handheld, or speech,
among others. The default, if you don't spec-
ify anything, is all —the styles will apply no
matter what the output device is.
Mobile browser support
CSS3 media queries are especially important for mobile browsers. All the current
major smartphone browsers have support: the iOS and Android standard brows-
ers; mobile Opera and Firefox; and IE in Windows Mobile 7.5.
Media queries avoid browser detection by letting the browser itself
determine what support it has. If a new browser or device comes along
that you hadn't anticipated, as long as you've used media queries, it
should still select the most appropriate set of CSS rules. CSS3 dramati-
cally extends the number of properties that can be used in media que-
ries. In the following sections, you'll see some practical examples of
media queries in use.
Search WWH ::

Custom Search