什么是更好的解决方案:
1)为所有支持的分辨率制作一个包含所有Media-Querys的CSS文件
<link rel="stylesheet" href="mobile.css" type="text/css" media="all" />
Run Code Online (Sandbox Code Playgroud)
2)为每个支持的分辨率制作一个CSS文件,并将其加载到标题中
<link rel="stylesheet" href="mobile.css" type="text/css" media="screen and (min-width:240px) and (max-width:639px)" />
<link rel="stylesheet" href="tablet.css" type="text/css" media="screen and (min-width:640px) and (max-width:1023px)" />
Run Code Online (Sandbox Code Playgroud)
???
我的意思是,在尝试2)有更多的请求,但这真的那么重要吗?