在W3C的规范中,它说:
“‘transform’属性的值是一个,它被定义为一系列变换定义,按照提供的顺序应用。如果提供了一系列变换,则净效果就好像每个变换都是按照提供的顺序单独指定的。”
当我在Firefox、Chrome和IE10中尝试使用以下标记时,所有三个浏览器都通过先进行翻译,然后再进行旋转来呈现!请参见codepen片段。我错过了什么?还是这三个浏览器的实现不符合W3C标准?
“‘transform’属性的值是一个,它被定义为一系列变换定义,按照提供的顺序应用。如果提供了一系列变换,则净效果就好像每个变换都是按照提供的顺序单独指定的。”
当我在Firefox、Chrome和IE10中尝试使用以下标记时,所有三个浏览器都通过先进行翻译,然后再进行旋转来呈现!请参见codepen片段。我错过了什么?还是这三个浏览器的实现不符合W3C标准?
<svg width="180" height="200"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- This is the element before translation and rotation are applied -->
<rect x="0" y="0" height="100" width="100" style="stroke:#000; fill: #0086B2" fill-opacity=0.2 stroke-opacity=0.2></rect>
<!-- Now we add a text element and apply rotate and translate to both -->
<rect x="0" y="0" height="100" width="100" style="stroke:#000; fill: #0086B2" transform="rotate(45 100 50) translate(50)"></rect>
</svg>