我在任何地方都找不到关于如何设置respond.js的信息。
我打开了htdocs -这是对的吗?还是我只需要htdocs中的respond.min.js?
然后像这样引用这个文件..。
<script src="respond.min.js"></script>目前,我已经在我的头部分,尝试了之前和之后的媒体查询,但没有使用样式表。
是否有关于如何设置resonse.js的教程,因为我不知道我是否做错了什么,或者是否有其他问题。
任何帮助都将是非常感谢的,我的网站终于完成了,但是我不希望它在没有媒体查询的情况下运行,而且目前如果我使用媒体查询,在IE8中根本不会加载任何触笔表。
谢谢
这是我目前的代码;
<!DOCTYPE HTML>
<html lang="en">
<head>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://localhost/respond.min.js"></script>
<![endif]-->
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" media="screen and (min-device-width:600px) and (max-device-width:1024px)" href="http://localhost/oldScreen.css">
<link type="text/css" rel="stylesheet" media="screen and (min-device-width:1025px)" href="http://localhost/home.css">
<title>Eastbourne Netball League[Home] </title>
</head>发布于 2014-02-19 20:11:29
好的,由于文件已经加载,问题必须来自以下两点之一:
从文件中:
我猜是第二点:)
希望能帮上忙。
编辑
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" media="screen and (min-width:600px) and (max-width:1024px)" href="http://localhost/oldScreen.css">
<link type="text/css" rel="stylesheet" media="screen and (min-width:1025px)" href="http://localhost/home.css">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://localhost/respond.min.js"></script>
<![endif]-->
<title>Eastbourne Netball League[Home] </title>
</head>如果这不起作用,请将其放在CSS文件中:
@media {min-width:600px) and (max-width:1024px) {
/* your css here */
}
@media {min-width:1025px) {
/* your css here */
}因此,您甚至可以将所有CSS放在同一个文件中。
https://stackoverflow.com/questions/21890235
复制相似问题