asp.net – 分类失败.返回未最终内容
发布时间:2020-12-15 23:55:08 所属栏目:asp.Net 来源:网络整理
导读:我已经使我的第一个网站使用MVC 5在本地机器上工作正常,但是当我发布到服务器的一些css没有正确加载. /* Minification failed. Returning unminified contents.(80,1): run-time error CSS1019: Unexpected token,found '@import'(80,9): run-time error CSS
我已经使我的第一个网站使用MVC 5在本地机器上工作正常,但是当我发布到服务器的一些css没有正确加载.
/* Minification failed. Returning unminified contents. (80,1): run-time error CSS1019: Unexpected token,found '@import' (80,9): run-time error CSS1019: Unexpected token,found 'url('../Content/dark-skin/skin.css')' (671,16): run-time error CSS1062: Expected semicolon or closing curly-brace,found ':' (1288,found ':' (1680,found '@keyframes' (1682,5): run-time error CSS1062: Expected semicolon or closing curly-brace,found '50%' (1685,found '@-webkit-keyframes' (1687,found '50%' */ /* NUGET: BEGIN LICENSE TEXT * * Microsoft grants you the right to use these script files for the sole * purpose of either: (i) interacting through your browser with the Microsoft * website or online service,subject to the applicable licensing or use * terms; or (ii) using the files as included with a Microsoft product subject * to that product's license terms. Microsoft reserves all other rights to the * files not expressly granted by Microsoft,whether by implication,estoppel * or otherwise. The notices and licenses below are for informational purposes only. * * NUGET: END LICENSE TEXT */ /*! * Bootstrap v3.0.0 * * Copyright 2013 Twitter,Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world by @mdo and @fat. *//*! normalize.css v2.1.0 | MIT License | git.io/normalize */ 我知道编译器正在尝试最小化css文件,但是没有这样做.我尝试纠正这些错误,但是在纠正了一些错误后,再次发布错误看起来是一样的,就像没有选择我的更改. 最简单的事情是使用bootstrap.css文件,我对网站的目的稍作修改.发布时,更改不在包文件中. Bootstrap服务器是否有可能不是我的项目? bundles.Add(new StyleBundle("~/Content/cssmain").Include( "~/Content/bootstrap.css","~/Content/site.css","~/Content/ilightbox.css","~/Content/bannerscollection_zoominout.css")); 我也尝试使用Web应用程序自己做细化,但是我的更改不可见,文件看起来不是很细致. 任何帮助是赞赏 解决方法
我通过做两件事情解决了捆绑bootstrap.css的问题:
>将bootstrap.css首先包含在包中.问题中的代码示例已经这样做了,但我没有. 请注意,如果您使用特定的主题,请使用主题提供的文件替换bootstrap.css和bootstrap.min.css.以下是我的项目中使用spacelab主题的工作代码: bundles.Add(new StyleBundle(GetStyleBundlePath("bootstrap")).Include( "~/Content/3rdParty/bootstrap.spacelab.css","~/Content/3rdParty/bootstrap-datepicker.css","~/Content/3rdParty/bootstrap-multiselect.css")); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- dotnetcore3.1 WPF 中使用依赖注入
- asp.net-core – 重定向登录到Controller Action
- asp.net-mvc-3 – Mvc 3图像上传库
- 将ASP.NET的“ReturnURL”转换为绝对URL
- asp.net-mvc-3 – 如何在ASP.NET MVC 3中分离代码(清除代码
- 在子文件夹中运行ASP.NET网站
- asp.net-mvc – MVC3部署依赖问题
- 删除ASP.NET MVC 4路由到应用程序根目录中的尾随斜杠
- asp.net-mvc – 如何重定向HTTP到HTTPS在MVC应用程序(IIS7.
- asp.net-mvc-4 – 在TrasactionScope中使用WebSercurity.Cr
推荐文章
站长推荐
- ASP.NET隐藏字段与不可见的文本框
- asp.net中ScriptManager和ScriptManagerProxy之间
- asp.net-mvc – mvc – 页面标题 – 两种不同的设
- asp.net-mvc – 在ASP.Net MVC中的操作后替换par
- asp.net-mvc – asp.NET:未知长度的MVC路径
- asp.net-mvc-3 – 从View中访问RouteData.Values
- asp.net – 我的HTML5的doctype是否必须在第一行
- ASP.NET Web API为单个路由定制IHttpControllerS
- asp.net-mvc – NullReferenceException ASP.NET
- asp.net-mvc – ASP.NET MVC缓存如何为AJAX请求工
热点阅读