2016-08-21 3 views
-1

min-width:368px;을 데스크톱 모드로 사용할 때 작동하지만 그 이후로 미디어 쿼리를 사용하면서 max-width:368px (모바일 및 태블릿 용)으로 변환 중이며 작동하지 않습니다. . 값이 아닌 min-width 값을 사용하고 있습니다. 왜?.CSS3 : 최대 너비와 최소 너비

예 :

min-width: 368px;(desktop); 
max-width: 368px;(mobile, tablet); 

답변

0

이 시도 :

@media screen and (max-device-width: 480px) and (orientation: portrait){ 
/* some CSS here */ 
} 

/* #### Mobile Phones Landscape #### */ 
@media screen and (max-device-width: 640px) and (orientation:landscape){ 
/* some CSS here */ 
} 

/* #### Mobile Phones Portrait or Landscape #### */ 
@media screen and (max-device-width: 640px){ 
/* some CSS here */ 
} 

/* #### iPhone 4+ Portrait or Landscape #### */ 
@media screen and (min-device-width: 320px) and (-webkit-min-device-pixel-ratio: 2){ 
/* some CSS here */ 
} 

/* #### iPhone 5 Portrait or Landscape #### */ 
@media (device-height: 568px) and (device-width: 320px) and (-webkit-min-device-pixel-ratio: 2){ 
/* some CSS here */ 
} 

/* #### iPhone 6 and 6 plus Portrait or Landscape #### */ 
    @media (min-device-height: 667px) and (min-device-width: 375px) and (-webkit-min-device-pixel-ratio: 3){ 
    /* some CSS here */ 
    } 

    /* #### Tablets Portrait or Landscape #### */ 
    @media screen and (min-device-width: 768px) and (max-device-width: 1024px){ 
    /* some CSS here */ 
} 

/* #### Desktops #### */ 
@media screen and (min-width: 1024px){ 
    /* some CSS here */ 
} 
관련 문제