1.1024px顯屏css
@media screen and (max-width : 1024px) { /* 樣式寫在這裏 */ }
2.800px顯屏html
@media screen and (max-width : 800px) { /* 樣式寫在這裏 */ }
3.640px顯屏git
@media screen and (max-width : 640px) { /* 樣式寫在這*/ }
4.iPad橫板顯屏github
@media screen and (max-device-width: 1024px) and (orientation: landscape) { /* 樣式寫在這 */ }
5.iPad豎板顯屏bootstrap
@media screen and (max-device-width: 768px) and (orientation: portrait) { /* 樣式寫在這 */ }
6.iPhone 和 Smartphonesspa
@media screen and (min-device-width: 320px) and (min-device-width: 480px) { /* 樣式寫在這 */ }
如今有關於這方面的運用也是至關的成熟,twitter的Bootstrap第二版本中就加上了這方面的運用。你們能夠對比一下:設計
@media (max-width: 480px) { ... } code
@media (max-width: 768px) { ... } htm
@media (min-width: 768px) and (max-width: 980px) { ... } ip
@media (min-width: 1200px) { .. }