Home > front end > Href and SRC cannot reference files in the directory at the same level, need to input the complete r
Href and SRC cannot reference files in the directory at the same level, need to input the complete r
Time:12-22
Do encounter a problem when I log in registration page, use the link reference folder in the directory of the login at the same level. The CSS must be written as <link rel="stylesheet" type="text/CSS" href="https://bbs.csdn.net/topics/User/login/css/login.css"/& gt; To load a CSS style
This is loading of CSS page
But written & lt; Link rel="stylesheet" type="text/CSS" href="https://bbs.csdn.net/topics/css/login.css"/& gt; The CSS style disappeared when
This is not loaded to the CSS style page
Strange is clearly above shows the login page. The JSP and CSS folder is in the same directory, but I can't write CSS/login. The CSS but must be written in User/login/CSS/login. The CSS to load the style
To solve this is why?
CodePudding user response:
Your HTML page is set up & lt; Base href="http://www.xxxx.com/"/& gt; So all the relative address links in the page are relative to the http://www.xxxx.com/
CodePudding user response:
Are generally set up & lt; Base href="https://bbs.csdn.net/"/& gt; Let all relative address in page links are relative to the root directory of the site, Such links between different directory replication with HTML code or move files don't need to modify the code is one of the links of