[英]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.