How do I refer to an image resource from CSS in grails?

后端 未结 5 2010
别那么骄傲
别那么骄傲 2021-02-13 20:07

I want to refer to an image in my main stylesheet for a Grails app and I can\'t get it to work. My image lives in the standard location in my Grails app...

proj         


        
5条回答
  •  别那么骄傲
    2021-02-13 20:45

    So the problem seemed to be that the browser was looking into

    http://localhost:8080//assets/images/

    which seems correct but if you inspect other images on the page, they render from the path

    http://localhost:8080//assets/background-image-name 
    

    So, just by excluding images in your path-name should fix the issue. However, this is just a work around which I am sure would have a better explaination and a solution. Cheers.

提交回复
热议问题