I have established these breakpoints
X-Small devices (portrait phones, less than 576px)
@media (max-width: 576px) {
body {
background-color: red;
}
}
Small devices (landscape phones, less than 768px)
@media (max-width: 768px) {
body {
background-color: blue;
}
}
Medium devices (tablets, less than 992px)
@media (max-width: 992px) {
body {
background-color: green;
}
}
Large devices (desktops, less than 1200px)
@media (max-width: 1200px) {
body {
background-color: purple;
}
}
X-Large devices (large desktops, less than 1400px)
@media (max-width: 1400px) {
body {
background-color: yellow;
}
}
Why does the color always stay yellow when I resize the screen instead of changing with the specified breakpoints?