transparent url(../images/f4.gif) repeat scroll 0 0比如
<%=this.ResolveClientUrl("~/index.aspx")%>'形式?

解决方案 »

  1.   

     \UserControl\Top.ascx我写的这个东西,样式表在各个地方会出现不一致,比如在根下好好的
    但是一到一个目录,比如food下面就出问题了
      

  2.   

    ~/   只能在CodeFile里写.
    你要想图片路径也这样写.那么指定图片的代码必须写在CodeFile里.(也就是.cs文件里)
      

  3.   

    我是越看越糊涂了楼主地址不是写在也面的么?
    这样的,进子文件下就不能用了?
    transparent url(/images/f4.gif) repeat scroll 0 0 
      

  4.   

    usercontrol  在各个不同层要使用,要注意路径啊///
      

  5.   

    transparent url(~/images/f4.gif) repeat scroll 0 0 
    这样不知道成不?
      

  6.   

    images相对于不同的层 不是独立的吗?
      

  7.   

    这样background:transparent url(http://fm371.img.xiaonei.com/tribe/20080223/09/15/A934580969695PEP.gif)
      

  8.   

    transparent url(../images/f4.gif)transparent url(./images/f4.gif)transparent url(/images/f4.gif)楼主试下这三个就明白了
      

  9.   

    不是的,css和image还是用相对路径来的好.
      

  10.   

    http://topic.csdn.net/u/20091215/15/26b3a408-e68e-441e-9632-b59de32cb4a4.html