Pathing from ../ in subdomain

本小妞迷上赌 提交于 2019-12-02 10:32:06

let say I have some masive structure like this.

Now in this case I want to do is in the css -> style -> loginCSS I have a css file named as login and I want to take that

ca_grain_texture.jpg and set it as a background of my login.html file so we see that our html files are in the main directory and also our css folder is in main directory

so if i want to grab the grain jpg file from my login.css file. I have to do somthing like this.

e.g

body{
    background-image: url(../../../images/cs_grain_texture.jpg);
}

on writing ../ everytime it will jump one folder back similar to cd/ in command shell.

../ means it will go to loginCSS folder.

../../ means style folder.

../../../ means css which is the main directory.

I hope it helps understanding I understood this way and hope it clears your view.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!