2016-11-01 46 views
0

我用在線CSS壓縮工具壓縮我的CSS。這個CSS是animation.css它有幾個動畫腳本。像如何正確壓縮CSS

.animate1 
    { 
     -webkit-animation-delay: .5s; 
     -moz-animation-delay: .5s; 
     -ms-animation-delay: .5s; 
     animation-delay: .5s; 
    } 

    .animate2{ 
     -webkit-animation-delay: 1.0s; 
     -moz-animation-delay: 1.0s; 
     -ms-animation-delay: 1.0s; 
     animation-delay: 1.0s; 
    } 

我用了幾個在線工具,如

https://cssminifier.com/

https://csscompressor.net/

http://www.cleancss.com/css-minify/

但我的問題是後壓縮它顯示在代碼錯誤也動畫是CSS停止工作。什麼是最好的方式來做到這一點。或任何人都可以建議一個正確的工具。在這裏,這是我的CSS代碼看起來象壓縮後,

enter image description here

+0

有什麼錯誤...? – deceze

+0

我沒有看到你所做的一個問題 – felix91

+0

這是一個比以前更好的問題。我不確定爲什麼它被關閉,除非是因爲你的例子沒有給出任何問題 – mplungjan

回答

2
.animate1{-webkit-animation-delay:.5s;-moz-animation-delay:.5s;-ms-animation-delay:.5s;animation-delay:.5s} 
.animate2{-webkit-animation-delay:1s;-moz-animation-delay:1s;-ms-animation-delay:1s;animation-delay:1s} 

我用https://csscompressor.net/但在高級設置停用優化速記舊版本瀏覽器

+0

是的,我改變了一些高級設置..它刪除了一些{}和分號。thanx – KBK