【问题标题】:Laravel can't find bootstrap styleLaravel 找不到引导样式
【发布时间】:2015-08-17 13:43:36
【问题描述】:

我正在尝试从https://github.com/FezVrasta/bootstrap-material-design 安装引导程序。但是,当我按照说明进行操作时,它将不起作用。我已将 3 个地图 css、字体和 js 放在公共文件夹中。这是我的 master.blade 视图:

<html>
<head>
    <title> @yield('title') </title>
   <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
    <!-- Include roboto.css to use the Roboto web font, material.css to include the theme and ripples.css to style the ripple effect -->
    <link href="/css/roboto.min.css" rel="stylesheet">
    <link href="/css/material.min.css" rel="stylesheet">
    <link href="/css/ripples.min.css" rel="stylesheet">

</head>
<body>

@include('shared.navbar')

@yield('content')

<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>

<script src="/js/ripples.min.js"></script>
<script src="/js/material.min.js"></script>
<script>
    $(document).ready(function() {
        // This command is used to initialize some elements and make them work properly
        $.material.init();
    });
</script>
</body>
</html>

【问题讨论】:

  • 是的,我的公用文件夹网址目前是localhost/laravel/public
  • 首先要检查的是您的浏览器控制台,看看是否有任何文件链接错误。
  • 尝试把链接放http https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css
  • @Shehary 那行不通。
  • @patricksweeney 你到底是什么意思?

标签: twitter-bootstrap laravel-5 bootstrap-material-design


【解决方案1】:

试试下面的一个:

<!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">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>Page Title</title>

    <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <h1>Hello, world!</h1>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  </body>
</html>

让我知道它是否有效...参考:bootstrap

【讨论】:

    猜你喜欢
    • 2020-08-06
    • 1970-01-01
    • 2019-04-06
    • 1970-01-01
    • 2017-04-25
    • 2014-10-12
    • 1970-01-01
    • 1970-01-01
    • 2021-08-16
    相关资源
    最近更新 更多