gpt4 book ai didi

javascript - 无法在 ASP.NET 中呈现 css

转载 作者:太空宇宙 更新时间:2023-11-04 08:22:51 24 4
gpt4 key购买 nike

我修改了 main.min.css 和 main.full.css(设置另一种背景颜色),页面现在无法呈现 css。这只是一个 HTML。

母版页:(带链接的缩略版)

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="ZASshop.master.cs" Inherits="ZASshop.NET.ZASshop" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Assembly="ZAScontrols" Namespace="ZAScontrols" TagPrefix="zas" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="MasterHead" runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link href="/App_Firma/css/main.min.css" rel="stylesheet" type="text/css" media="screen" />
<link href="/App_Firma/css/firm.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
<link href="/App_Firma/DayPilot/Themes/scheduler_8.css" rel="stylesheet" type="text/css"/>
<link href="/App_Firma/css/custom.css" rel="stylesheet" type="text/css" media="screen"/>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

在此文件末尾指向脚本的链接:

<script src="/App_Firma/js/app.min.js"></script>

我还在 Chrome 控制台中收到警告和错误:

LoginPage.aspx:7 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost/LoginPage.aspx?ReturnUrl=%2fApp_Firma%2fcss%2fcustom.css". LoginPage.aspx:7 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost/LoginPage.aspx?ReturnUrl=%2fApp_Firma%2fcss%2ffirm.css". LoginPage.aspx:7 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost/LoginPage.aspx?ReturnUrl=%2fApp_Firma%2fcss%2fmain.min.css". LoginPage.aspx:7 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost/LoginPage.aspx?ReturnUrl=%2fApp_Firma%2fDayPilot%2fThemes%2fscheduler_8.css". LoginPage.aspx?ReturnUrl=%2fApp_Firma%2fjs%2fapp.min.js:2 Uncaught SyntaxError: Unexpected token <

最佳答案

改变:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-
awesome/4.6.1/css/font-awesome.min.css">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-
awesome/4.6.1/css/font-awesome.min.css" type="text/css"/>

你需要用'/'结束标签

也检查这个帖子,似乎是同样的问题:

Resource interpreted as Stylesheet but transferred with MIME type text/html in ASP.NET IIS

关于javascript - 无法在 ASP.NET 中呈现 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45410544/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com