我是Laravel 4的初学者,我使用HTML类包含css文件,但是它没有用,所以请帮助我.我的代码是: -
在视图中: - model_window.php
<?php HTML::style('css/style.css'); ?>
<a href="#openModal"><input type="submit" value="show" name=""show_button></a>
<div id="openModal" class="modalDialog">
<div>
<a href="#close" title="Close" class="close">X</a>
<h2>Modal Box</h2>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我的css文件: - 在公共场合 - > css - > style.css
.modalDialog:target {
opacity:1;
pointer-events: auto;
}
.modalDialog > div {
width: 400px;
position: relative;
margin: 10% auto;
padding: 5px 20px 13px 20px;
border-radius: 10px;
background: #fff;
background: -moz-linear-gradient(#fff, #999);
background: -webkit-linear-gradient(#fff, #999);
background: -o-linear-gradient(#fff, #999);
}
Run Code Online (Sandbox Code Playgroud)
你可以将你的文件重命名为index.blade.php,其中第二个必须有刀片,你可以简单地使用:
{{ HTML::style('public/css/index.css') }}
{{ HTML::script('public/js/jquery.pnotify.min.js') }}
Run Code Online (Sandbox Code Playgroud)
你必须将文件放入公共目录,然后才能轻松使用
<?php echo HTML::style('css/style.css'); ?>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12735 次 |
| 最近记录: |