样式表由于不支持其 MIME 类型而未显示,尽管在调试时 MIME 类型显示为空白

A Stylesheet is not being displayed due to its MIME type not being supported, though the MIME type appears blank when debugging

当尝试将样式应用于网站上的特定页面时(完全相同的样式适用于网络服务器上的其他地方),我收到以下错误

Refused to apply style from 'style.css' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

我已在本地尝试 运行 文件,但仅将文件导入 HTML 并且运行良好。我也在同一个网络服务器上的一个空白页面上尝试过这个,再次,它工作得很好。

我还替换了文件,因为担心它是文件的编码,并且我删除了文件中的所有注释 ()。

CSS文件全部内容如下

#Main_ctl01_lst {
    width: 320px;
}

#Main_ctl02_txt{
    height: 25px;
    width: 200px;
}

#Main_ctl03_txt {
    width: 250px;
}

.label #Main_ctl04_lbL:fter  { 
    content: "*";
    font-family: inherit;
    font-size: 9pt;
    color: red;
}

.label #Main_ctl05_lbl:after {
    content: "*";
    font-family: inherit;
    font-size: 9pt;
    color: red;
}

.label #Main_ctl06_lbl:after {
    content: "*";
    font-family: inherit;
    font-size: 9pt;
    color: red;
}

.label #Main_ctl07_lbl:after {
    content: "*";
    font-family: inherit;
    font-size: 9pt;
    color: red;
}

.label #Main_ctl08_lbl {
    font-size: 0;
}

.label #Main_ctl09_lbl:before {
    content: "Content";
    font-family: inherit;
    font-size: 9pt;
}

.label #Main_ctl010_lbl:after {
    content: "*";
    font-family: inherit;
    font-size: 9pt;
    color: red;
}

.label #Main_ctl110_lbl {
    font-size: 0;
}

.label #Main_ctl11_lbl:before {
    content: "Content";
    font-family: inherit;
    font-size: 9pt;
}

.label #Main_ctl13_lbl:after {
    content: "*";
    font-family: inherit;
    font-size: 9pt;
    color: red;
}

/* Line 3*/
.label #Main_ctl114_lbl {
    font-size: 0;
}

.label #Main_ctl115_lbl:before {
    content: "*";
    font-family: inherit;
    font-size: 9pt;
}


/* Line 4*/
.label #Main_ctl16_lbl {
    font-size: 0;
}

.label #Main_ctl17_lbl:before {
    content: "Content";
    font-family: inherit;
    font-size: 9pt;
}


.label #Main_ctl118_lbl {
    display: none;
}

.input #Main_ctl19_dp {
    display: none;
}

.input1 {
    visibility: hidden;
}

.input2 {
    display: none;

}

.label {
    display: none;
}

body {
    background-image: url(https://example.com/image.png); 
    background-color: rgb(255,0,0); 
    background-color: #FF0000; 
}

和网页的头部代码

<head>
    <script src="/Content/jquery-1.9.1.min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/Content/jquery-ui-1.8.14.custom.css">
    <script src="/Content/jquery-ui-1.8.14.custom.min.js" type="text/javascript"></script>
    <script src="/Content/Test.Scripts.js" type="text/javascript"></script>
    <script src="/Content/Reflection.js" type="text/javascript"></script>
    <script src="/Content/CollapsibleCheckBoxList.js" type="text/javascript"></script>
    <script src="/Content/Scripts.jQuery.Extensions.js" type="text/javascript"></script>
    <title>Test</title>
    <link rel="shortcut icon" media="all" type="image/x-icon" href="/Content/favicon.ico">
    <script type="text/javascript" src="/content/jquery.autotab-1.1b.js"></script>
    <script type="text/javascript" src="/content/jquery.calculation.min.js"></script>
    <script type="text/javascript" src="/content/jquery.format.1.05.js"></script>
    <script type="text/javascript" src="/App_Templates/FrontEnd.Test/TestScript.js"></script>
    <link href="/App_Templates/Common/_Reset.css" type="text/css" rel="stylesheet">
    <link href="../App_Templates/FrontEnd.Test/Standard.css" type="text/css" rel="stylesheet">
    <link href="../App_Templates/FrontEnd.Test/Template.css" type="text/css" rel="stylesheet">
    <link href="/App_Templates/Common/Menus.css" type="text/css" rel="stylesheet">
    <!--[if lte IE 8]>
        <link href="../App_Templates/Common/IE8.css" rel="stylesheet" type="text/css" />
    <![endif]-->
    <link href="/WebResource.axd?d{{removed}}" type="text/css" rel="stylesheet"><link type="text/css" href="/s3?Styles.CssFile/{{culprit_file}}.css&{{removed}}" rel="stylesheet">
</head>

如果脚本按预期运行,我希望看到红色背景。如前所述,在其他地方是这样,但在这个特定网页上不是这样。

实际上,由于 MIME 类型问题,文件中的任何内容都未加载。

这件事被搁置了一段时间(我才刚刚回来!)。

通过从另一台计算机上传文件,此问题已完全解决。在查看文件无法从原始机器上传的可能原因后,我们一无所获。

我们相信这可能是由于新线路和运输问题returns。但是我们看不到任何证据。对于缺少答案,我深表歉意,尽管我们真的很难回答这个问题。