2011-03-01 61 views
1

我有一个网站@local和大量的网站图像,但是在部署网站到服务器图像后,路径被破坏(在css文件中给出的异常),我需要尽快修复可能。根据iis修复文件路径

样本路径:

imageurl = @"/Images/sample.gif"; 

我怎样才能解决这一问题?
谢谢。

+0

thx很多迪帕克和穆罕默德都是这些 – 2011-03-03 12:44:30

回答

1

你可以设置在web.config文件与服务器的URL appsetting像

,并得到这个代码路径并添加图像名称。

1
Images (like background-url) in CSS are always referenced relative to the css file. 

您需要在CSS文件中像设置...

background-image: url( '../../Images/image.gif'); 

.. this will bring out one folder from current folder hierarchy