我在选择器中使用 asset_path
向其添加多个背景图像。
在 SCSS 上,这是我的代码:
background-image: url(asset-path('bg1.jpg')), url(asset-path('bg2.jpg')), url(asset-path('bg3.jpg'))
这是CSS中的输出
background-image: url("somehashbg1.jpg"), url("somehashbg2.jpg"), url("somehashbg3.jpg")
CSS 没有渲染它。多个背景的 url(...)
中不期望引号
有没有办法从 Assets 路径的输出中去除引号?
最佳答案
asset-url
没有 url()
是要走的路
背景图片:asset-url(bg1.jpg'), asset-url('bg2.jpg'), asset-url('bg3.jpg')
关于css - 从 asset_path 输出中删除双引号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31328100/