当css文件位于background image url
目录中时,如何引用vendor/assets/stylesheets
?在查看SO
帖子之后
background: url(myimage.png) repeat-x;
和
background: asset-url('myimage.png'image) repeat-x;
但他们都没有工作
答案 0 :(得分:1)
你应该试试
background: url("/assets/ion/myimage.png") repeat-x;
答案 1 :(得分:0)
将图片放在app/vendor/assets/images/myimage.png
#research_sign {
background: url("myimage.png") repeat-x;
}
#Important: don't forget to restart your server!
(as you added image inside your vendor/images)
答案 2 :(得分:0)
尝试此文件路径
background-image: url("../../assets/ion/myimage.png") repeat-x;