Frage

I've been looking at media queries to adjust background-size from 'contain' to 'cover' when the browser width creates an aspect ratio of less than 4:3.

The effect is to deliver a background image which no longer displays in its entirety, but at least fills the screen for a professional look.

There is a selector 'device-aspect-ratio', but this is not well-supported.

Is there some kind of work around that avoids giving declarations for various device screen dimensions?

War es hilfreich?

Lösung

No workaround afaik. You could resort to a javascript solution if that's an option for you that toggles a class.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top