Home  >  Article  >  Backend Development  >  判断是手机屏幕还是电脑屏幕,然后加载一个css文件

判断是手机屏幕还是电脑屏幕,然后加载一个css文件

WBOY
WBOYOriginal
2016-06-23 13:48:581099browse

新手请教问题,如题,有关于这方面的文章之类的 发一下也ok  谢谢!


回复讨论(解决方案)

过去做个一个项目需求:根据用户端终端   PC显示图片460*460   phone显示200*200   我copy了下面这个class
https://ellislab.com/codeigniter/user-guide/libraries/user_agent.html

我判断了一个屏幕宽度,>1024的加载a.css  

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn