Specifying base url for css

前端 未结 3 1072
抹茶落季
抹茶落季 2020-12-05 22:33

I had to split up a long css file. I put the smaller css files within a styles directory.

Now I have to update the the urls to go up one level with the

3条回答
  •  既然无缘
    2020-12-05 22:54

    No, there isn't. I suggest to place the CSS images in at least the same level as the CSS file so that you don't need to go backwards in the path. E.g. /css folder for CSS files and /css/images folder for CSS images. Then you can consistently use url('images/name.ext') for CSS images. This way you can place the root /css folder practically everywhere without fiddling with the image URL's.

提交回复
热议问题