I wrote a simple HTML program for experimental purposes:
Here is the code:
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: green;
}
@media screen and (device-height: 375px) and (device-width: 667px) {
body {
background-color: blue;
}
}
</style>
</head>
<body>
<p>Media queries are simple filters that can be applied to CSS styles. They make it easy to change styles based on the characteristics of the device rendering the content, including the display type, width, height, orientation and even resolution.</p>
</body>
</html>
But ut doesn't change color when it is tried in iPhone 6. What is wrong with the code? Is logical expression correct?
device-widthanddevice-heightwill calculate exact width and height. So usemin-heightandmin-widthinstead ofdevice-widthanddevice-height.