我有一个问题,html 不会为小屏幕加载 css。我已经让其他 css 加载没有问题。那些工作的有背景图像,但一个宽度小于 500 像素的小屏幕没有。它将只有背景颜色。我尝试将图像缩放到 500 像素并在 small.css 中添加为背景图像,它可以工作,但我不会这样做。请帮忙。这是html代码:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, maximum-scale=1.0, minimum- scale=1.0, initial-scale=1.0" />
<title>PROCYCLING | MTB klub</title>
<link rel="stylesheet" type="text/css" href="mainstyle.css" />
<link rel="stylesheet" type="text/css" media="only screen and (min-width:801px) and (max-width:1024px)" href="large.css" />
<link rel="stylesheet" type="text/css" media="only screen and (min-width:501px) and (max-width:800px)" href="medium.css" />
<link rel="stylesheet" type="text/css" media="only screen and (min-width: 50px) and (max-width:500px)" href="small.css" />
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
</body>
这是没有背景图片的 CSS:
@charset "UTF-8";
/* Small Content Formatting */
body{
color:#6fe123;
line-height:1.5em;
font-family: Myriad Pro, Arial, Verdana;
font-size: 14px;
background-color: #2a2a2a;
}