문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top