我使用了所有这些:
1. body{ background-image: url('example.png') background-repeat: repeat;
2. body{ background-image: url('assets/example.png') background-repeat: repeat;
3. body{ background-image: url(<%= asset_path 'example.png') background-repeat: repeat;
4. body{ background-image: image-url(<%= asset_path 'example.png' %>) background-repeat: repeat;
5. body{ background-image: image-url('example.png') background-repeat:repeat;
6. body{ background-image: image-url('assets/example.png') background-repeat:repeat;
run assets:precompile不是所有的工作,如何解决这个问题,为什么不工作呢?
发布于 2015-05-20 07:31:04
数字5最接近正确的语法。是不是因为您没有用分号结束您的第一个CSS规则?
body{
background-image: image-url('example.png');
background-repeat:repeat;
}这应该是可行的-注意背景图像行末尾的分号。
或者,将它们合并到一个规则中:
body{
background: image-url('example.png') repeat;
}https://stackoverflow.com/questions/30337733
复制相似问题