2014-11-30 2 views
0

동일한 너비와 높이에 대해 미디어 쿼리를 적용하는 가장 좋은 방법은 무엇입니까?동일한 너비 다른 높이에 대한 미디어 쿼리

예를 들어 나는 article#chapterthankyou{ width:984px; } 스타일이 적용되는 경우에도 1366 X 657에,이 샘플 코드를

@media screen and (max-width: 1366px), screen and (max-height: 657px){ 
     article#chapterthankyou{ 
     width:984px; 
     } 

    } 

@media screen and (max-width: 1366px), screen and (max-height: 768px){ 

     article#chapterthankyou{ 
     width:1048px; 
     } 

    } 

문제가 있습니다.

높이 너비 조건을 정확하게 적용하려면 어떻게해야합니까? 감사합니다.

답변

1

MDN의 닫기는 되겠지만, this article에 따르면, 당신은 당신의 논리적 인 운영자와 조금 떨어져 있습니다. 코드에 대한

이를 사용해보십시오 :

@media screen 
and (max-width: 1366px) 
and (max-height: 657px){ 

     article#chapterthankyou{ 
     width:984px; 

     } 
    } 

그리고를 ...

@media screen 
and (max-width: 1366px) 
and (max-height: 768px){ 

     article#chapterthankyou{ 
     width:1048px; 

     } 
    } 

를이 여전히 작동하지 않는 경우, 다른 미디어 쿼리의 목록에 대한 here을 참조하는 당신을 유용 할 수 있습니다.

관련 문제