2017-06-19 244 views

回答

2

复制从here

@media (min-height: 1024px) and (min-width: 1366px) { 
    /* CSS stuff */ 
} 

粘贴不要忘记在头<meta name="viewport" content="width=device-width, initial-scale=1.0"> meta标签了。

+0

谢谢如何在这个代码中添加最大高度 –

+0

'@media(min-height:1024px)and(min-width:1366px)and(max-height:1024px){* CSS stuff */ } 取自 - https://developer.mozilla.org/zh-CN/docs/Web/CSS/Media_Queries/Using_media_queries#Logical_operators 使用逻辑运算符来处理您的工艺。 –

+0

它工作了@kaung :) –

0
@media only screen 
and (min-device-width : 1024px) 
and (max-device-width : 1366px) { /* STYLES GO HERE */} 

参考link

0
@media only screen 
     and (min-device-width: 1024px) 
     and (max-device-width: 1366px) 
     and (-webkit-min-device-pixel-ratio: 1.5) { 
    //code 
    } 

您也可以指定是否要设置在肖像或风景:

/* Portrait */ 
    @media only screen 
     and (min-device-width: 1024px) 
     and (max-device-width: 1366px) 
     and (orientation: portrait) 
     and (-webkit-min-device-pixel-ratio: 1.5) { 
    //code 
    } 

/* Landscape */ 
@media only screen 
    and (min-device-width: 1024px) 
    and (max-device-width: 1366px) 
    and (orientation: landscape) 
    and (-webkit-min-device-pixel-ratio: 1.5) { 
//code 
}