我想将CSS转换代码转换成jss,并在reactjs项目中使用它。如何以jss格式编写此代码?
我已阅读此文档。但这只是简单的过渡。 https://cssinjs.org/repl/
.item {
-webkit-transition-property: -webkit-transform, opacity;
transition-property: transform, opacity;
-webkit-transition-duration: 0.3s, 0.3s;
transition-duration: 0.3s, 0.3s;
-webkit-transition-timing-function: cubic-bezier(0.35, -0.59, 0.47, 0.97);
transition-timing-function: cubic-bezier(0.35, -0.59, 0.47, 0.97);
}
答案 0 :(得分:2)
基本上编写CSS属性 camelCased
,并将其值作为 'string literal'
:
transition: ['transform', 'opacity'],
transitionDuration: 300,
transitionTimingFunction: 'cubic-bezier(0.35, -0.59, 0.47, 0.97)',