如何在 Laravel 5.2 中编辑 bootstrap css 个文件
how to edit bootstrap css files in Laravel 5.2
你好,我在 Laravel 5.2 应用程序中工作,bootstrap.My bootstrap 文件在 Laravel 应用程序的 public 文件夹中。现在我需要更改 "Welcome"
的 div 标签的颜色
<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">Welcome</div>
<div class="panel-body">
Your Application's Landing Page.
</div>
</div>
</div>
</div>
</div>
那我怎样才能改变它的颜色呢?我可以访问 public 文件夹中的 bootstrap css 个文件吗?
我所做的(在 Laravel 中没有太多经验)是在 public/css 中添加一个我自己的 css 文件,其中包含我想要更改的样式,然后将其包含在app.blade.php:
<link rel="stylesheet" href="{{ URL::asset('css/style.css') }}" />
最简单的方法是在您的欢迎行中添加一个 id 属性:
<div id="my-welcome" class="panel-heading">Welcome</div>
然后将这样的样式添加到您的 style.css:
#my-welcome {
color: red;
}
是的,为了简单起见,您应该 link 在 welcome.blade.php 文件中添加一个样式表,如下所示:
<link type="stylesheet" css="{{ asset('css/style.css') }}" />
(这将在 /public/css/stlye.css 中查找 css 文件)
在 stlye.css 文件中添加以下 css:
.panel-heading {
background-color: green; /* will change the background color */
color: blue; /* will change the color of the font */
}
你好,我在 Laravel 5.2 应用程序中工作,bootstrap.My bootstrap 文件在 Laravel 应用程序的 public 文件夹中。现在我需要更改 "Welcome"
的 div 标签的颜色<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">Welcome</div>
<div class="panel-body">
Your Application's Landing Page.
</div>
</div>
</div>
</div>
</div>
那我怎样才能改变它的颜色呢?我可以访问 public 文件夹中的 bootstrap css 个文件吗?
我所做的(在 Laravel 中没有太多经验)是在 public/css 中添加一个我自己的 css 文件,其中包含我想要更改的样式,然后将其包含在app.blade.php:
<link rel="stylesheet" href="{{ URL::asset('css/style.css') }}" />
最简单的方法是在您的欢迎行中添加一个 id 属性:
<div id="my-welcome" class="panel-heading">Welcome</div>
然后将这样的样式添加到您的 style.css:
#my-welcome {
color: red;
}
是的,为了简单起见,您应该 link 在 welcome.blade.php 文件中添加一个样式表,如下所示:
<link type="stylesheet" css="{{ asset('css/style.css') }}" />
(这将在 /public/css/stlye.css 中查找 css 文件)
在 stlye.css 文件中添加以下 css:
.panel-heading {
background-color: green; /* will change the background color */
color: blue; /* will change the color of the font */
}