{% stylesheets
'@AppBundle/Resources/public/css/bootstrap.min.css'
'@AppBundle/Resources/public/fonts/*'
'@AppBundle/Resources/public/css/custom.css'
filter='cssrewrite'%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
这些是 CSS 链接
.topblock div:first-child{
background: url('../images/subsbg.jpg') no-repeat center top;
text-align: center;
color: #fff;
font-size: 18px;
}
这是 custom.css 中的一个类结果,网站上的路径试图给出这个
/Resources/public/images/subsbg.jpg
当然,没有照片。在这种情况下如何与 Assetic 合作?
帮助官方手册。css 不能通过@AppBundle 链接。仅通过捆绑/