问题
I'm working on a site and I'm trying to use multiple media queries: big screens, medium screens, small screens. I have a single stylesheet for the page and following the overall styling I enter the media queries:
@media only screen and (min-width: 1135px)
@media only screen and (min-width: 751px) and (max-width: 1134px)
@media only screen and (max-width: 750px)
Certain elements from the 751->1134 respond while others do not (they follow the default styling). Nothing from the <750 changes
The elements in questions are a div with display: inline-block and elements being floated within:
// Default styling
div.image {
width: 50%;
float: left;
}
div.text {
width: 50%;
float: left;
}
// Media query #2
div.image {
width: 40%;
float: left;
}
div.text {
width: 45%;
float: left;
margin-left: 5%;
}
Any ideas?
来源:https://stackoverflow.com/questions/25950360/only-certain-elements-responding-to-media-queries