现在同一个网页要有PC端、平板端和手机端的不同应用,电脑和手机的尺寸相差很大的,同一种网页布局肯定不能同时满足要求。因此,要针对不同尺寸范围设置不同的网页css样式读取。
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="css/index-style.css">
<link rel="stylesheet" media="screen and (max-width: 500px)" href="css/phone-index-style.css">
<link rel="stylesheet" media="screen and (min-width: 501px) and (max-width: 1024px)" href="css/pad-index-style.css">