Javascript 为什么加载资源失败:net::ERR\u FILE\u未找到?
我正在用bootstrap制作一个表单,当我从文件夹中打开HTML文件时,出现了以下错误,并且没有加载样式 但是,当我在VisualStudio代码中使用Live Server打开HTML时,一切正常 为什么会发生,我如何解决?这是我的密码:Javascript 为什么加载资源失败:net::ERR\u FILE\u未找到?,javascript,html,css,bootstrap-4,styles,Javascript,Html,Css,Bootstrap 4,Styles,我正在用bootstrap制作一个表单,当我从文件夹中打开HTML文件时,出现了以下错误,并且没有加载样式 但是,当我在VisualStudio代码中使用Live Server打开HTML时,一切正常 为什么会发生,我如何解决?这是我的密码: <!-- Bootstrap CSS --> <link rel="stylesheet" href="/practica bootstrap-copia/css/bootstrap.min.css&quo
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="/practica bootstrap-copia/css/bootstrap.min.css">
<link rel="stylesheet" href="/practica bootstrap-copia/form.css">
<link href="https://fonts.googleapis.com/css2?family=Bodoni+Moda:wght@400;800&display=swap" rel="stylesheet">
<title>Arma tu cv</title>
阿玛图cv
谢谢您的关注。我重现了您的问题并找到了解决方案。删除HREF中的前导正斜杠。它们需要是相对的目录位置,而不是绝对的
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="practica bootstrap-copia/css/bootstrap.min.css">
<link rel="stylesheet" href="practica bootstrap-copia/form.css">
<link href="https://fonts.googleapis.com/css2?family=Bodoni+Moda:wght@400;800&display=swap" rel="stylesheet">
<title>Arma tu cv</title>
阿玛图cv
此:/practica bootstrap copia/css/bootstrap.min.css
包含空格字符。不要在将通过href
或src
访问的目录或文件名中使用空格。这会引起问题。
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="practica bootstrap-copia/css/bootstrap.min.css">
<link rel="stylesheet" href="practica bootstrap-copia/form.css">
<link href="https://fonts.googleapis.com/css2?family=Bodoni+Moda:wght@400;800&display=swap" rel="stylesheet">
<title>Arma tu cv</title>