CSS响应式设计iPad专有CSS3_CSS Responsive design iPad-Specific CSS3

摘自:http://css-tricks.com/snippets/css/ipad-specific-css/在做响应式设计的时候个人兼容性css代码则将下面ipad兼容代码加入:

@media only screen and (device-width: 768px) {
/ For general iPad layouts /
}

@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait) {
/ For portrait layouts only /
}

@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape) {
/ For landscape layouts only /
}

在为各种手持设备专有的css则如下:

@media handheld, only screen and (max-width: 980px),only screen and (device-width: 768px){}



@media only screen and (device-width: 768px) {
/ For general iPad layouts /
}

@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait) {
/ For portrait layouts only /
}

@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape) {
/ For landscape layouts only /
}
http://css-tricks.com/snippets/css/ipad-specific-css/