JellyBool

17773 经验值

这个是app.blade.php里面的:

<!DOCTYPE html>
<html class="no-js" lang="zh-CN">
<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>Laravel 5 教程</title>
    <link rel='stylesheet' href="/css/all.css" type='text/css' media='all'/>
    <script type='text/javascript' src="/js/all.js"></script>
    <link rel='stylesheet' href="/css/bootstrap.min.css" type='text/css' media='all'/>
    <link rel='stylesheet' href="/css/all.css" type='text/css' media='all'/>
</head>
<body>
<div id="wrapper">
     <div class="container">
                <section class="content">
                    <div class="pad group">
                        @yield('content')
                    </div>
                </section>
     </div>

     <nav class="nav-container group" id="nav-footer">
        <div class="nav-wrap">
            <ul class="nav container group">
                <li class="menu-item">
                    <a href="/" rel="nofollow" target="_blank">Laravel 5 Blog</a>
                </li>
            </ul>
        </div>
    </nav>

 </div>    
</body>
</html>

检查元素有看到css样式起作用么?

一开始首页也是没有样式的,后来这样引入就有样式了:、

@foreach($articles as $article)
<link rel='stylesheet' href="/css/bootstrap.min.css" type='text/css' media='all'/>
<link rel='stylesheet' href="/css/all.css" type='text/css' media='all'/>
<article class="format-image group">
    <h2 class="post-title pad">
        <a href="/articles/{ $article->id }"> { $article->title }</a>
    </h2>
    <div class="post-inner">
        <div class="post-deco">
            <div class="hex hex-small">
                <div class="hex-inner"><i class="fa"></i></div>
                <div class="corner-1"></div>
                <div class="corner-2"></div>
            </div>
        </div>
        <div class="post-content pad">
            <div class="entry custome">
                { $article->intro }
            </div>
            <a class="more-link-custom" href="/articles/{ $article->id }"><span><i>更多</i></span></a>
        </div>
    </div>
</article>
@endforeach
Remote Address:[::1]:80
Request URL:http://localhost/css/bootstrap.min.css
Request Method:GET
Status Code:404 Not Found

好像后台没有成功加载bootstrap.min.css

为什么要这样引入呢?在public/css/文件有没有对应得css文件

public/css/文件有对应的css文件,但是不这样引入的话,页面没有加载出来

怎么会》。。。app.blade.php你引入一次就好的啊