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

后端 未结 5 2008
别那么骄傲
别那么骄傲 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:50

    Try adding "../" at the beginning of the URI. For example:

    ../images/outbound-blue.png
    

    The "../" at the start of the URI tells the browser to go up one level to the parent directory then look in the images directory. Currently you have it set up to look for a subdirectory called images in the directory containing stylesheets.

提交回复
热议问题