Will the following media queries behave exactly same on mobile devices and computers or there’s any difference?
@media only screen and (max-width: 480px),
screen and (max-device-width: 480px){
...
}
and
@media (max-width: 480px) {
..
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, they will not. This is because
device-widthis not the same aswidth. If your media query has justwidththey’ll behave the same, but when you introducedevice-widthyou’ll get different results. Refer to my response to this question for more info: CSS stylesheet that targets iPhone iPad not working