如何找出创建bootstrap-material的位置

时间:2015-08-03 04:19:08

标签: javascript css twitter-bootstrap material-design bootstrap-material-design

我正在尝试在我的网站中使用Bootstrap-Material

我在使复选框工作时遇到问题。当我将代码从Bootstrap-Material站点复制到我的项目时,大多数功能都可以工作,但标签“Checkbox”旁边没有Box。而不是看起来像

material checkobx

看起来像

checkbox material

我一直在浏览Bootstrap-Material上的源代码,并且我已经导入了他们拥有的所有cssjs

令人困惑的是,我检查了Bootstrap-Material page复选框上的元素,我无法弄清楚cssjs文件实际创建了什么复选框。它似乎不是来自图像文件,所以它来自哪里?也许如果我能弄明白它的创建地点,我可以弄清楚为什么我的项目没有渲染它。

关于这个盒子来自哪里的任何想法?

1 个答案:

答案 0 :(得分:2)

要检查两件事:

1:您是否将$.material.init()称为活动材料设计 2:在Bootstrap v3.0 +文件之前,您的CSS文件是否与Material Design堆叠在一起 3:您正在使用jQuery 1.9.1 +。



$.material.init()

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/js/material.min.js"></script>

<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/css/material.min.css" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">

  <h1 class="header">Checkbox</h1>

  <!-- Simple checkbox with label -->
  <div class="sample1">
    <div class="checkbox">
      <label>
        <input type="checkbox"> Notifications</label>
    </div>

  </div>


</div>
&#13;
&#13;
&#13;