我的PHP文件头部有两个CSS链接。
<link rel="stylesheet" type="text/css" href="../styles/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../styles/style.css">
第一个(Bootstrap)有效。第二个不是。他们都在同一条道路上。我进行了双倍和三倍检查,确认第二个拼写正确。我该怎么办?
答案 0 :(得分:-1)
检查网站文件夹结构中文件的位置。
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
css is located in the same folder as the current page
<link rel="stylesheet" type="text/css" href="styles/bootstrap.min.css">
css is located in the styles folder in the current folder
<link rel="stylesheet" type="text/css" href="/styles/bootstrap.min.css">
css is located in the styles folder at the root of the current web
<link rel="stylesheet" type="text/css" href="../styles/bootstrap.min.css">
css is located in the folder one level up from the current folder