Reference app relative virtual paths in .css file

后端 未结 8 2082
生来不讨喜
生来不讨喜 2020-12-24 02:03

Assume I have an \"images\" folder directory under the root of my application. How can I, from within a .css file, reference an image in this directory using an ASP.NET app

8条回答
  •  清酒与你
    2020-12-24 02:54

    Inside of the .css file you can use relative paths; so in your example, say you put your css file in ~/Styles/mystyles.css. You can use url(../Images/Test.gif) as an example.

提交回复
热议问题