Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/388.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 为什么加载资源失败:net::ERR\u FILE\u未找到?_Javascript_Html_Css_Bootstrap 4_Styles - Fatal编程技术网

Javascript 为什么加载资源失败:net::ERR\u FILE\u未找到?

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制作一个表单,当我从文件夹中打开HTML文件时,出现了以下错误,并且没有加载样式

但是,当我在VisualStudio代码中使用Live Server打开HTML时,一切正常

为什么会发生,我如何解决?这是我的密码:

 <!-- 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>