0

我正在尝试将bootstrap-material-design主题实现到我现有的 Bootstrap 站点。

在我的main.blade.php中,我在顶部有这个来表示样式表。

<!-- CSS -->
<link href="/css/all.css" rel="stylesheet">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.2.1/css/material.min.css" />
{{--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/css/material-fullpalette.min.css" />--}}

<!-- Scripts -->
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://code.jquery.com/ui/1.10.2/jquery-ui.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/js/material.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/js/ripples.min.js'></script>
<script type="text/javascript"></script>

这是我的主要刀片文件 - 这是存在于我所有视图中的刀片包装文件。

在这个主刀片的底部,按照文档的指示,我有这个 JS:

<script>
    $(document).ready(function() {
        $.material.init();
    });
</script>

但是,当我尝试单击按钮或导航栏元素时,没有涟漪效应。我的控制台上也没有看到任何错误。

我是否需要向我的按钮类添加任何其他代码?

编辑:

这是网络选项卡:

在此处输入图像描述

4

2 回答 2

2

请试试这个。我更改订单或脚本并添加一个 css

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

    <!DOCTYPE html>
<html lang="en">
<head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <title></title>


    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <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 type="text/javascript"></script>


    <link href='http://fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
</head>
<body>
        <div class="container">           
            <button class="btn btn-success ripple-effect">Wow.!</button>
            <button class="btn btn-info ripple-effect">Ripple Work.!</button>
        </div>
</body>
</html>
 <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://code.jquery.com/ui/1.10.2/jquery-ui.js'></script>
<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>
<script>
$( document ).ready(function() 
{
    $(function() 
    {
        $.material.init();
    });
});    
</script>
于 2015-07-28T06:59:42.423 回答
0

加载arrive.jsmaterial-design.js

使用凉亭安装bower install arrive --save

于 2016-07-18T02:34:14.257 回答