W3C home > Mailing lists > Public > www-style@w3.org > February 2012

[CSS3 Animation and transforms] CSS properties in JavaScript

From: Alan Gresley <alan@css-class.com>
Date: Fri, 24 Feb 2012 16:57:36 +1100
Message-ID: <4F4726D0.1080905@css-class.com>
To: CSS 3 W3C Group <www-style@w3.org>
Hello,

I am wanting to test FF12.0a2 (Aurora) for various CSS3 animation and 
transforms but some of this testing requires CSS properties in JavaScript.

What do I need to do to the below script to allow for MozProperty that 
works together with WebkitProperty?


<script type="text/javascript">

function left()
{
document.getElementById('elem1').style.WebkitTransform="rotateY(90deg)";
document.getElementById('elem2').style.background="blue";
}

</script>


The below code does not work for either WebKit or Gecko (which I did 
expect).

<script type="text/javascript">

function left()
{
document.getElementById('elem1').style.WebkitTransform="rotateY(90deg)";
document.getElementById('elem1').style.MozTransform="rotateY(90deg)";
document.getElementById('elem2').style.background="blue";
}

</script>


-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/
Received on Friday, 24 February 2012 05:58:18 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:51 GMT