CSS root directory

前端 未结 6 1477
小鲜肉
小鲜肉 2020-12-13 00:01

I have a style sheet where I include background images.

background: url(../Images/myImage.png);

problem is, pages from different directorie

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-13 00:17

    click here for good explaination!

    All you need to know about relative file paths:

    Starting with "/" returns to the root directory and starts there

    Starting with "../" moves one directory backward and starts there

    Starting with "../../" moves two directories backward and starts there (and so on...)

    To move forward, just start with the first subdirectory and keep moving forward

提交回复
热议问题