Bootstrap Material Design cdn

5

我想使用Bootstrap Material设计,Github页面显示可以从jsdelivr.com获取。但是开始使用页面上写道:

Once copied you need to initialize the material javascript by adding the following javascript to your site,

$.material.init()
在jsdelivr的集成页面上,建议使用以下内容:
<link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap.material-design/0.3.0/css/material-wfont.min.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap.material-design/0.3.0/css/material.min.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap.material-design/0.3.0/css/ripples.min.css">
<script src="//cdn.jsdelivr.net/bootstrap.material-design/0.3.0/js/material.min.js"></script>
<script src="//cdn.jsdelivr.net/bootstrap.material-design/0.3.0/js/ripples.min.js"></script>

但是看起来 material-wfont.min.css 返回了404错误。因为我不知道新的外观和感觉应该是什么样子,所以很难验证是否一切正常运作。

如果我使用CDN链接,那么我需要使用$.material.init()吗?


请从http://www.jsdelivr.com/#!bootstrap.material-design中查找所需内容。其中唯一的字体是Roboto字体和图标。因此,我会包括这两个而不是wfont,因为我也不知道wfont应该是什么样子,肯定是因为没有指定CSS文件。 - Dorvalla
有没有示例可以参考? - Phillip Senn
2个回答

4

尝试更改标签为

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/css/roboto.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/css/material-fullpalette.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/css/ripples.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/js/material.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/js/ripples.min.js"></script>

0

下载它

如果您从Github页面下载文件,会更容易。 您可以在http://fezvrasta.github.io/bootstrap-material-design/上获得更多信息。

使用Bower

bower install bootstrap-material-design

在添加 Material Design JavaScript 文件之前,您还需要 jQuery(jquery.com)和来自 getbootstrap.com 的原始 Bootstrap。


这个问题是关于CDN的。 - Anis LOUNIS aka AnixPasBesoin

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接