why image-path is not resolved in scss?

后端 未结 1 1556
孤独总比滥情好
孤独总比滥情好 2021-01-15 23:29

in my app, I have a scss file, resulted from a gem, resident in the gem folder out side of my app project folder

in works just fine locally, I have the path to image

相关标签:
1条回答
  • 2021-01-16 00:20

    If it is scss and not compass then it would go like this (look at where you sprites folder is compared to your scss file)

    .social-share-button-baidu 
    { 
       display:inline-block; 
       width: 16px; 
       height: 16px; 
       background: url(../sprites/social-share-button.png) 0px 0px no-repeat;
    }
    

    ../ takes you up out of one folder, can you see the sprites folder from there?

    0 讨论(0)
提交回复
热议问题