简体   繁体   English

标头错误,css / bootstrap问题

[英]Headers error, css/bootstrap issues

First of all,here is my file-data "structure": 首先,这是我的文件数据“结构”:

在此处输入图片说明

Inside css folder there is a file estilos.css, but theres something wrong. 在css文件夹中有一个文件estilos.css,但是出了点问题。 My program works porperly but if i use the inspect elemnt i got some error. 我的程序工作正常,但是如果我使用检查元素,则会出现一些错误。 Take a look: 看一看:

在此处输入图片说明

Here is my code: 这是我的代码:

<head>
<link rel="stylesheet" href="../css/estilos.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

Hope you can help me! 希望你能帮我!

The error is because you have a css file whose name is estilos rather than estilos.css . 该错误是因为您有一个名为estilos而不是estilos.css的css文件。 As you pointed out in the image at https://i.gyazo.com/a2eadcbadd51094154e9471924a386c6.png 如您在图片中指出的https://i.gyazo.com/a2eadcbadd51094154e9471924a386c6.png

https://i.gyazo.com/a2eadcbadd51094154e9471924a386c6.png

Rename the file to estilos.css and you will not get the error anymore. 将文件重命名为estilos.css,您将不再收到错误。

Also change your code from 同时更改您的代码

<link rel="stylesheet" href="../css/estilos.css">

To

<link rel="stylesheet" href="css/estilos.css">

The ../ is not required 不需要../

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM