CSS3 Media Queries と Adaptive Layout のサンプル | Greensleeves
@media screen and (max-width: 640px) {
body { background: #f00;}
}
@media screen and (max-width: 800px) and (min-width: 641px) {
body { background: #0f0;}
}
@media screen and (min-width: 801px) {
body { background: #00f;}
}
CSS3 の Media Queries に対応していればブラウザの表示空間幅が 640px 以下の場合背景レイアウトを赤、641px から 800px まで緑、801px からは青になります。