如何包含css取决于运行环境


How to include css depends on the Running Enviroment

我的网站有Mobiles css和Desktop 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: 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以减少请求

对adapte.js之类的东西有一个lok,或者编写自己的javascript。