background-image: -moz-linear-gradient(90deg,#e8f0ff,#ffffff); background-image: -ms-linear-gradient(90deg,#ffffff); background-image: -o-linear-gradient(90deg,#ffffff); background-image: -webkit-linear-gradient(90deg,#ffffff); background-image: linear-gradient(90deg,#ffffff);
这用于导致从底部的#e8f0ff到顶部的#fff的线性渐变.
Post-Firefox 16(几天之前发布),渐变现在从#e8f0ff左侧到#fff在右边.
当我删除供应商特定的CSS并留下:
background-image: linear-gradient(90deg,#ffffff);
什么都没发生.但是当我删除该行并且只留下供应商特定的样式时:
background-image: -moz-linear-gradient(90deg,#ffffff);
它纠正了这个问题.
那么FF16的新功能呢Xdeg的价值观是否从一个新的方向开始,只有在某些情况下才被加入?我不知道为什么它会做180deg与两个或只有一般,但只有90deg,如果它只是供应商.
问题是,Firefox的这个新行为的具体细节是什么,以及FF16中现在有渐变错误方式的网站最广泛,最符合标准的解决方案?
解决方法
using angles
For the purpose of this argument,‘0deg’ points upward,and positive angles represent clockwise rotation,so ‘90deg’ point [sic] toward
the right.
-moz-linear-gradient
,on the other hand,uses polar coordinates(强调我的):
A last semantic curiosity still exists between the prefixed variants and the unprefixed proposal. Following the initial Apple proposal,the prefixed variants of the Syntax all uses the an
<angle>
defined like polar angles,that is with 0deg representing the East. To be coherent with the rest of CSS,the specification defines an angle with 0deg representing the North. To prevent sites using prefixed version of the property to get suddenly broken,even when adapting to the otherwise forward-compatible final Syntax,they keep the original angle definition (0deg = East). They will switch to the correct spec when unprefixing the property. Also,as they aren’t incompatible,Gecko supports,prefixed,both the Syntax with the to keyword and without. Here again,the Syntax without the keyword will be dropped when unprefixing.