前端开发

CSS3可以根据分辨率来识别设备类型,然后写相应的CSS代码:



/* Custom, iPhone Retina */

@media only screen and (min-width : 320px) { }


/* Extra Small Devices, Phones */

@media only screen and (min-width : 480px) { }


/* Small Devices, Tablets */

@media only screen and (min-width : 768px) { }


/* Medium Devices, Desktops */

@media only screen and (min-width : 992px) { }


/* Large Devices, Wide Screens */

@media only screen and (min-width : 1200px) { }

css