2020年12月30日星期三

React JSX Transform has no effect

Here is the code: Also posted on CodePen

          let transStyle = {              flex: 1,              backgroundColor: '#cccc99',              width:200,              height:200,              transform: [                  { perspective: 500 },                  { translateX: -45 },                  { rotateY: '60deg' },              ],      }                 const App = (          <div style=>                <div style={transStyle}>mydiv</div>          </div>      );                  ReactDOM.render(        App,        document.getElementById("app")      );  

The transform effect which works perfectly in CSS form does not work in JSX. The need for JSX is so values can be changed real time. If you know what is wrong please update pen thanks.

https://stackoverflow.com/questions/65516414/react-jsx-transform-has-no-effect December 31, 2020 at 11:51AM

没有评论:

发表评论