[英]Index.html file CSS loading error
我刚刚启动了一个网站,它只是加载“原始HTML”。 我已经对此进行了数小时的故障排除,似乎无法找出原因。
这是代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="icon" type="image/ico" href="http://www.example.com/favicon.ico"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Example</title>
<!-- Bootstrap Core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Theme CSS -->
<link href="css/freelancer.min.css" rel="stylesheet">
任何帮助将非常感激。
请仔细检查您的CSS位置
如果将其放在单独的文件夹中,则可能需要使用类似的内容
<link rel="stylesheet" type="text/css" href="../min/freelancer.min.css">
如果与您的index.html位于同一文件夹中
<link rel="stylesheet" type="text/css" href="freelancer.min.css">
现在,如果您将index.html文件放在一个单独的文件夹中
<link rel="stylesheet" type="text/css" href="min/freelancer.min.css">
请注意,“ ../”使您从索引的当前位置返回一个文件夹
问题解决了。 我不得不将所有文件合并到.index.html中
<!-- Bootstrap Core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<!-- Theme CSS -->
<link href="css/freelancer.min.css" rel="stylesheet" type="text/css">
必须输入类型,请检查类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.