Php 添加Css文件
在master.blade.php中的何处Php 添加Css文件,php,Php,在master.blade.php中的何处 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 a
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?
我尝试了两种方法,但都没有成功,css文件不支持在任何视图文件夹文件中如何添加css文件
<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文件需要放在公用文件夹中,这样才能工作只需在Blade模板中包含一些行即可
请参见作为参考在此处发布您的文件结构-->公用文件夹-->css文件夹=style.css-->公用文件夹-->jsfolder=app.js文件-->查看文件夹-->布局文件夹=master.blade.phpi am将style.css文件和app.js包含在master.blade.php的头部分但不工作?是的,我添加了相同但不工作的css文件:{{HTML::style'css/style.css'}Avinash Babu你还有其他解决方案吗?你的css文件在哪里?在哪个文件夹中?在公用文件夹-->css文件夹中,style.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')) }}
{{ HTML::style('css/main.css') }}