Bootstrap Material Design cdn

僤鯓⒐⒋嵵緔 提交于 2019-12-05 00:17:51

问题


I'd like to use Bootstrap Material design, and the github page says that I can get it from jsdelivr.com. But then the Getting Started page says:

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

$.material.init()

The integration page at jsdelivr says to use this:

<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>

But it looks like material-wfont.min.css is returning 404. It's hard to verify if everything is working right or not because I don't know what to expect the new look and feel to be.

If I use the cdn links, so I need to use $.material.init()?


回答1:


Try to change the tags to

<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>



回答2:


Download it

It is easier if you download the files from the Github Page. You can have more information in http://fezvrasta.github.io/bootstrap-material-design/.

Use bower

bower install bootstrap-material-design

You'll also need jQuery (jquery.com) and the original Bootstrap from getbootstrap.com before adding the Material Design JavaScript files



来源:https://stackoverflow.com/questions/29153070/bootstrap-material-design-cdn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!