CSS不工作,我做什么,我检查了所有部分,也做了硬刷新,但它不工作?

  • 本文关键字:工作 刷新 CSS html css
  • 更新时间 :
  • 英文 :


这是我的index.html文件。这是result。html的头部部分css的名字是result。css在同一个文件夹

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link href="./result.css" type="stylesheet" type="text/css">
<title>Document</title>

你的link标签应该是这样的:

<link href="./result.css" rel="stylesheet" type="text/css">

似乎你不小心输入了type="stylesheet"而不是rel="stylesheet"

查看参考:https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types

最新更新