Is it possible to change the background-color of the h1
element when the browser ratio is 4:3? I've attempted using the aspect-ratio
property in my media query, but it doesn't seem to be working. Any suggestions on how to resolve this issue?
Check out the code here: https://codepen.io/s4ek1389/pen/MxWqrg
HTML:
<h1>Hello, World!</h1>
CSS:
h1 {
background-color: red;
}
@media screen and (aspect-ratio: 4/3) {
h1 {
background-color: blue;
}
}