Game Development Reference
In-Depth Information
Also, keep in mind that it is quite possible to define redundant media queries when
querying the aspect ratio. In a case such as this, as is the case with CSS, the last
matching expression overrules previous duplicated expressions and values.
// Aspect ratio evaluates to 1/1
@media all and (device-aspect-ratio: 1/1) {
h1 {
color: blue;
font-size: 3.0em;
}
}
// Aspect ratio evaluates to 1/1
@media all and (device-aspect-ratio: 1/1) {
h1 {
color: red;
font-size: 3.0em;
}
}
// Aspect ratio evaluates to 1/1
@media all and (device-aspect-ratio: 2/2) {
h1 {
color: green;
font-size: 0.5em;
}
}
// Aspect ratio evaluates to 1/1
@media all and (device-aspect-ratio: 10/10) {
h1 {
color: purple;
font-size: 0.5em;
}
}
// Aspect ratio evaluates to 1/1
@media all and (device-aspect-ratio: 2000/2000)
Search WWH ::




Custom Search