2013-01-10 36 views
4

我有一個使用的屬性,如下面幾個CSS clases:ASP.NET捆綁和縮小 - CSS3屬性失敗

.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, #fefefe 0%,#fafafa 48%,#f1f1f1 50%,#e9e9e9 100%); 
background: -o-linear-gradient(top, #fefefe 0%,#fafafa 48%,#f1f1f1 50%,#e9e9e9 100%); 
background: -ms-linear-gradient(top, #fefefe 0%,#fafafa 48%,#f1f1f1 50%,#e9e9e9 100%); 
background: linear-gradient(top, #fefefe 0%,#fafafa 48%,#f1f1f1 50%,#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」 */

如果刪除了多個「背景」屬性(離開只是其中之一)的微小的作品。

有沒有解決方案使用類似上面的CSS3屬性StyleBundle?

謝謝。

回答

2

Optimization命名空間中存在已知的錯誤,導致它在CSS3上失敗。錯誤報告是herehere。我可以提供的唯一建議是自己壓縮它們,併爲服務優化內容或使用不同縮小方法時的.min文件提供樣式束以供使用。

+0

非常感謝您的回答。我會研究mooncode解決方案。 – mmmmmm

+1

死鏈接 - 請修復 –

+0

鏈接已死,所以答案在其他地方。 – Moebius

0

也許,它可能是一種錯誤的模式(或者像我們在巴西說的'gambiarra'),但我修復了它將梯度標記移動到內聯。