2014-02-27 2 views
1

나는 반응 형 디자인을하고 있지만 제대로 이해하지 못하고있다. 이러한 장치에 대한 미디어 쿼리를 작성해야합니다. 해상도는 다음과 같습니다. * 320특정 장치에 대한 미디어 쿼리는 무엇입니까?

240 * 480

240 * 480

320 * 800

480

480 * 856

은 지금까지 이러한 매체를 시도 검색어가 있지만 충돌하는 것

@media only screen and (max-width:240px) { /* cover 240px portrait */} 

@media only screen and (min-width:320px) and (orientation : landscape) {/* cover 320px landscape for 240*320 */} 

@media only screen and (min-width : 479px) and (orientation : landscape) {/* cover 480px landscape */} 

@media only screen and (min-width : 480px) and (orientation:portrait) {/* cover 480px portrait */} 

답변

0

다음은 표준 장치에 대한 미디어 쿼리입니다. 정의 된 미디어에 전역 스타일을 별도로 지정하고 장치 특정 스타일을 작성할 수 있습니다.

/* Smartphones (portrait and landscape) ----------- */ 
@media only screen 
and (min-device-width : 320px) 
and (max-device-width : 480px) { 
/* Styles */ 
} 

/* Smartphones (landscape) ----------- */ 
@media only screen 
and (min-width : 321px) { 
/* Styles */ 
} 

/* Smartphones (portrait) ----------- */ 
@media only screen 
and (max-width : 320px) { 
/* Styles */ 
} 

/* iPads (portrait and landscape) ----------- */ 
@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) { 
/* Styles */ 
} 

/* iPads (landscape) ----------- */ 
@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) 
and (orientation : landscape) { 
/* Styles */ 
} 

/* iPads (portrait) ----------- */ 
@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) 
and (orientation : portrait) { 
/* Styles */ 
} 

/* Desktops and laptops ----------- */ 
@media only screen 
and (min-width : 1224px) { 
/* Styles */ 
} 

/* Large screens ----------- */ 
@media only screen 
and (min-width : 1824px) { 
/* Styles */ 
} 

/* iPhone 4 ----------- */ 
@media 
only screen and (-webkit-min-device-pixel-ratio : 1.5), 
only screen and (min-device-pixel-ratio : 1.5) { 
/* Styles */ 
} 

자세한 정보 here. 도움이되기를 바랍니다.

+0

이들을 작성하는 방법에 대한 자세한 정보가 필요합니까? – user2787474

관련 문제