添加 css 文件


Adding Css file

laravel 4.2: my demo project in ytform when i try to add css file (style.css) from public folder having another folder, css folder. try to get any class its not working .
in View: i have an other folder, name layouts and i am accessing here css file but not working?

在主刀中的位置.php

<head>
    @section('head')
    <meta charset="UTF-8">
    <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/css/style.css">
    @show
</head>

我尝试两种方式,但徒劳无功,CSS 文件不支持任何视图文件夹文件如何添加 CSS 文件

    <link rel="stylesheet" type="text/css" href="/css/style.css">
    {{HTML::style('css/style.css')}}
any solution or mistake ?
<link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}">

你可以试试这个

{{ HTML::style(asset('css/site.css'), array('rel' => 'stylesheet', 'type' => 'text/css')) }}

并且 CSS 文件需要位于公共文件夹中才能正常工作

只需在Blade template中包含一些行

{{ HTML::style('css/main.css') }}

请参阅此处作为参考