[英]Media query for landscape view
I need query for mobile iPhone 5 and galaxy S4 landscape view... 我需要查询移动iPhone 5和银河S4横向视图...
Her is my code but something is not ok here. 她是我的密码,但是这里有些问题。
@media
(max-width : 800px){
// style
@media
(max-width : 360px){
//style
On resolution 360 evrything is ok, What i need to enter for landscape view. 在分辨率360上,可以进行evrything,我需要输入横向视图。
iPhone 5 in landscape iPhone 5风景
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px)
and (orientation : landscape)
{
/* STYLES GO HERE */
}
Samsung Galaxy S4 Landscape (from here ) 三星银河S4景观(从这里 )
@media screen (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi)
and (device-width: 1920px)
and (orientation: landscape) {
/* Your styles here */
}
Use device-aspect-ratio
for iPhone 5 - it does not have a 16:9 aspect ratio. 为iPhone 5使用
device-aspect-ratio
它没有16:9的宽高比。 It is in fact 40:71. 实际上是40:71。
iPhone 5 only: 仅适用于iPhone 5:
@media screen and (device-aspect-ratio: 40/71) and (orientation:portrait) {
/*style here*/
}
Galaxy S4 only: 仅限Galaxy S4:
@media screen and (device-width: 320px) and (device-height: 640px) and (-webkit-device-pixel-ratio: 3) {
/*style here*/
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.