加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

ASP.NET捆绑和缩小 – CSS3属性失败

发布时间:2020-12-16 09:48:41 所属栏目:asp.Net 来源:网络整理
导读:我有几个css clases使用如下属性: .rfs_left_btn{width: 176px;height: 20px;background: #fefefe;background: -moz-linear-gradient(top,#fefefe 0%,#fafafa 48%,#f1f1f1 50%,#e9e9e9 100%);background: -webkit-gradient(linear,left top,left bottom,col
我有几个css clases使用如下属性:

.rfs_left_btn
{
width: 176px;
height: 20px;
background: #fefefe;
background: -moz-linear-gradient(top,#fefefe 0%,#fafafa 48%,#f1f1f1 50%,#e9e9e9 100%);
background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#fefefe),color-stop(48%,#fafafa),color-stop(50%,#f1f1f1),color-stop(100%,#e9e9e9));
background: -webkit-linear-gradient(top,#e9e9e9 100%);
background: -o-linear-gradient(top,#e9e9e9 100%);
background: -ms-linear-gradient(top,#e9e9e9 100%);
background: linear-gradient(top,#e9e9e9 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fefefe',endColorstr='#e9e9e9',GradientType=0 );
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px; /* Drop shadow*/
-webkit-box-shadow: 0px 1px 1px #cecece;
-moz-box-shadow: 0px 1px 1px #cecece;
box-shadow: 0px 1px 1px #cecece;
margin-bottom: 5px;
}

在创建如下的StyleBundle时:

StyleBundle bundle_cssSession = new StyleBundle("~/Css/bundle_session");
bundle_cssSession.Include("~/Styles/_catalog.css");

System.Web.Optimization.Styles.Render(“?/ Css / bundle_session”)失败,并显示以下错误:

/ *缩小失败.返回未经授权的内容.
(2196,14):运行时错误CSS1036:预期表达式,找到’0′
?* /

如果我删除了多个“背景”属性(并且只留下其中一个属性),则缩小工作.

是否有一个解决方案使用StyleBundle与CSS3属性,如上所述?

谢谢.

解决方法

Optimization命名空间中存在已知的错误,导致它在CSS3上失败.错误报告是 here和 here.我可以提供的唯一建议是自己压缩它们并为样式包提供.min文件,以便在提供优化内容或使用不同的缩小方法时使用.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读