http://www.vanseodesign.com/css/media-queries/
Chaining Media Queries
As I said above we can use the “and” operator to chain queries like so:
1 | @media screen and (max-width: 1200px) and (orientation: landscape)
|
We can also use the “not” operator as in:
1 | @media not projection and (max-width: 1200px)
|
to target devices other than projection with a max-with of 1200px. The “not” operator is evaluated last so the above is evaluated as:
1 | @media not ( projection and (max-width: 1200px) )
|
There’s no specific “or” operator, but can imply “or” by using a comma.
1 2 | @media screen and (min-width: 800px) and (orientation: landscape),
@media screen and (max-width: 1200px)
|
The above would target both screens with a min-width of 800px in that are in landscape mode and screens with a max-width of 1200px.
No comments:
Post a Comment