Php 如何包含css取决于运行环境
我的网站有手机css和桌面css,我已经包括了它们Php 如何包含css取决于运行环境,php,html,css,Php,Html,Css,我的网站有手机css和桌面css,我已经包括了它们 <link rel="stylesheet" type="text/css" media="only screen and (max-width: 1320px)" href="styles/responsive-grid/small-desktop.css" /> <link rel="stylesheet" type="text/css" media="only screen and (max-width:
<link rel="stylesheet" type="text/css" media="only screen and (max-width: 1320px)" href="styles/responsive-grid/small-desktop.css" />
<link rel="stylesheet" type="text/css" media="only screen and (max-width: 990px)" href="styles/responsive-grid/tablet.css" />
<link rel="stylesheet" type="text/css" media="only screen and (max-width: 660px)" href="styles/responsive-grid/mobile.css" />
<link rel="stylesheet" type="text/css" media="only screen and (max-width: 990px)" href="styles/tablet.css" />
<link rel="stylesheet" type="text/css" media="only screen and (max-width: 660px)" href="styles/mobile.css" />
这个工作很好,但是
我需要在桌面上只包含桌面css,在移动设备上只包含移动css,以减少请求在类似的东西上进行尝试或编写自己的javascript。我已经尝试过了,但页面加载需要花费很多时间