reactjs - react automatically remove vendor prefix in inline style? -
i using css vendor prefix in inline-style in component,
because of target browsers need it.
var react = require('react'); var reactdom = require('react-dom'); var app = react.createclass({ getinitialstate: function() { return { r: 0 }; }, render: function() { return ( <div style={{ 'webkittransform': 'rotate(' + this.state.r + 'deg)', 'transform': 'rotate(' + this.state.r + 'deg)' }} onclick={this._click}> text </div> ); }, _click: function() { this.setstate({ r: -100 }); } }); reactdom.render( <app />, document.getelementbyid('app') );
as can see, use webkittransform
, transform
, react rendered transform
, how make render -webkit-transform
?
Comments
Post a Comment