首页 新闻 搜索 专区 学院

MVC Bundle 遇到的问题【文件压缩失败】

0
悬赏园豆:5 [已关闭问题] 关闭于 2017-03-22 10:57

调用之后的结果显示:

 1 /* 未能缩小。正在返回未缩小的内容。
 2 (1567,65): run-time error CSS1054: JavaScript error in expression property: Variable has not been declared: auto
 3 (5909,65): run-time error CSS1054: JavaScript error in expression property: Variable has not been declared: auto
 4 (6018,90): run-time error CSS1054: JavaScript error in expression property: Variable has not been declared: documentElement
 5 (6019,90): run-time error CSS1054: JavaScript error in expression property: Variable has not been declared: documentElement
 6 (6051,90): run-time error CSS1054: JavaScript error in expression property: Variable has not been declared: documentElement
 7 (6052,90): run-time error CSS1054: JavaScript error in expression property: Variable has not been declared: documentElement
 8 (6293,89): run-time error CSS1054: JavaScript error in expression property: Variable has not been declared: documentElement
 9 (6649,21): run-time error CSS1062: Expected semicolon or closing curly-brace, found ':'
10 (7167,7): run-time error CSS1031: Expected selector, found '='
11 (7167,7): run-time error CSS1025: Expected comma or open brace, found '='
12  */

样式表(1567行)

1 *html .content img {
2 width:expression(this.width>320&&this.width>this.height?320:auto)
3 }
View Code

5909行:

1 *html .content img, *html .thumbImage img {
2 width:expression(this.width>320&&this.width>this.height?320:auto)
3 }
View Code

6018行

1 * html .mask {
2     position: absolute;
3 left:expression(documentElement.scrollLeft+documentElement.clientWidth - this.offsetWidth);
4 top:expression(documentElement.scrollTop+documentElement.clientHeight - this.offsetHeight)
5 }
View Code

是不是MVC 的bundle 压缩技术不支持此类的表达式方式?
求助园里的大神。

MVC
D、boy的主页 D、boy | 菜鸟二级 | 园豆:201
提问于:2016-01-16 11:04
< >
分享
所有回答(1)
0

我也遇到此问题 目前只能 不打包 ,还有什么 好方法么!

Hero小默 | 园豆:53 (初学一级) | 2017-05-26 18:04

我昨天解决了 是因为   StyleBundle 或者scriptBundle使用的不正确。。请检查你的 bundlesCogfin

bundles.Add(new StyleBundle("~/Bundle/Styles/tipsy").Include(
"~/js/lib/tipsy/tipsy.hovercard.css",
"~/js/lib/tipsy/tipsy.css"));

支持(0) 反对(0) Hero小默 | 园豆:53 (初学一级) | 2017-05-27 09:12

@Hero小默: 对的,我的也是同样情况,后面发现是bootstrap的版本太高了(4.2.0)降到(3.4.0)就能打包成功。

支持(0) 反对(0) TTonlyV5 | 园豆:200 (初学一级) | 2019-02-06 22:14
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册