I'm using Twitter Bootstrap to responsive website and I don't understand the difference between
@media screen and (min-width: 768px)
@media (min-width: 768px)
"Screen" or not? any help?
I'm using Twitter Bootstrap to responsive website and I don't understand the difference between
@media screen and (min-width: 768px)
@media (min-width: 768px)
"Screen" or not? any help?
http://www.w3.org/TR/CSS21/media.html#at-media-rule
@media screen is computer screen, so
The first rule is for computer screens only with resolution width at least 768px.
The second rule is just for devices with width >=768px including tablets, phones, printers etc., that have high enough resolution.
screen
is a media type and means that rule will be used on computer screens. Without it it's just a general rule and will be applied for all media types.
The browser identifies itself as being in the “screen” category.
Specification applies to devices of a certain media type (‘screen’) ,screen is intended primarily for color computer screens. So it identifies roughly to modern devices desktop smartphone etc
So it will work for color computer screens at differing resolutions e.g.
only screen and (min-width: 480px)
only screen and (min-width: 768px)
only screen and (min-width: 992px)
only screen and (min-width: 1280px)