javascript css3-mediaqueries.js -> 如何从谷歌代码中包含?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9023792/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
css3-mediaqueries.js -> How to include from google code?
提问by matt
I'm using the the HTML5Shiv from google code on my site. I'm including it like this …
我在我的网站上使用来自谷歌代码的 HTML5Shiv。我像这样包括它......
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
I also need to include css3-mediauqeris.js that is also available on google code. However I can only find the download link for the js-file but can't find an actual link to directly load it from google-code.
我还需要包含 css3-mediauqeris.js,它也可在 google 代码中使用。但是,我只能找到 js 文件的下载链接,但找不到直接从 google-code 加载它的实际链接。
http://code.google.com/p/css3-mediaqueries-js/
http://code.google.com/p/css3-mediaqueries-js/
Any ideas?
有任何想法吗?
Thank you for your info.
谢谢你的信息。
回答by Gaurav Kakkar
Use this:
用这个:
<!--[if lt IE 9]>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
回答by buley
This code is not officially supportedby Google for its Libraries API, but you should be able to include the most recent version via a vanilla script tag using the downloadable version from code.google.com (warning, not the safest way to load JS).
Google并未为其 Libraries API正式支持此代码,但您应该能够使用来自 code.google.com 的可下载版本通过 vanilla 脚本标签包含最新版本(警告,这不是加载 JS 的最安全方式) .
<script src="http://css3-mediaqueries-js.googlecode.com/files/css3-mediaqueries.js"></script>