2017-06-19 55 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 
}