我只是想驗證一個大的CSS文件,並最終有89個錯誤!爲了節省時間,我嘗試在color zilla上使用跨瀏覽器漸變生成工具。這些生成的梯度最終導致我的錯誤的約90%:如何減少梯度誤差?
background: rgb(56,115,160); /* Old browsers */
background: -moz-linear-gradient(top, rgba(56,115,160,1) 0%, rgba(55,107,147,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(56,115,160,1)), color-stop(100%,rgba(55,107,147,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(56,115,160,1) 0%,rgba(55,107,147,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(56,115,160,1) 0%,rgba(55,107,147,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(56,115,160,1) 0%,rgba(55,107,147,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(56,115,160,1) 0%,rgba(55,107,147,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3873a0', endColorstr='#376b93',GradientType=0); /* IE6-9 */
我的錯誤讀:
391 #nav Value Error : background Too many values or values are not recognized : -moz-linear-gradient(top,rgba(21,60,91,1) 0%,rgba(43,63,81,1) 100%)
392 #nav Value Error : background Too many values or values are not recognized : -webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(21,60,91,1)),color-stop(100%,rgba(43,63,81,1)))
393 #nav Value Error : background Too many values or values are not recognized : -webkit-linear-gradient(top,rgba(21,60,91,1) 0%,rgba(43,63,81,1) 100%)
394 #nav Value Error : background Too many values or values are not recognized : -o-linear-gradient(top,rgba(21,60,91,1) 0%,rgba(43,63,81,1) 100%)
395 #nav Value Error : background Too many values or values are not recognized : -ms-linear-gradient(top,rgba(21,60,91,1) 0%,rgba(43,63,81,1) 100%)
396 #nav Value Error : background Too many values or values are not recognized : linear-gradient(top,rgba(21,60,91,1) 0%,rgba(43,63,81,1) 100%)
397 #nav attempt to find a semi-colon before the property name. add it
397 #nav Property progid doesn't exist : DXImageTransform
397 #nav Parse Error DXImageTransform.Microsoft.gradient(startColorstr='#153c5b', endColorstr='#2b3f51',GradientType=0);
梯度在所有瀏覽器很好看。我應該關心這些錯誤嗎? 如果是這樣,我最好的選擇是什麼?
謝謝,會做。 – Scott