mobile
미디어쿼리 활용
aneyh.c
2012. 5. 9. 10:20
1. style 태그 안에
@media screen and (orientation:portrait) { } //세로
@media screen and (orientation:landscape) { } //가로
@media screen and (max-width:799px) { }
/*
only 키워드 :
미디어쿼리를 지원하는 브라우져에서만 인식하도록 함.
지원하지 않는 브라우져에서는 only 가 있으면 무시되어 실행되지 않음.
*/
@media only screen and (orientation:landscape) { }
@media only screen and (orientation:portrait) { }
/* 스크린 너비가 320 그리고 높이가 480 이면 실행 */
@media screen and (device-width:320px) and (device-height:480px) { }