CSS responsive design - detect portrait display -


i know it's pure css possible adapt stylesheet according screen dimensions, this:

@media (max-width: 959px) {   /* styles smallest viewport widths */ }  @media (min-width: 600px) , (max-width: 959px) {   /* styles mid-tier viewport widths */ }  @media (min-width: 960px) {   /* original css styles */ } 

(source)

is pure css possible check on landscape or portrait display?

yes, using following syntax:

@media , (orientation: landscape) {} 

see w3 specs more information.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -