You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Can I use inline styles? {#can-i-use-inline-styles}
35
+
### 可以使用行内样式吗? {#can-i-use-inline-styles}
36
36
37
-
Yes, see the docs on styling [here](/docs/dom-elements.html#style).
37
+
可以,在[此处](/docs/dom-elements.html#style)查看关于样式的文档。
38
38
39
-
### Are inline styles bad? {#are-inline-styles-bad}
39
+
### 行内样式不好 (bad) 吗? {#are-inline-styles-bad}
40
40
41
-
CSS classes are generally better for performance than inline styles.
41
+
从性能角度来说,CSS 的 class 通常比行内样式更好。
42
42
43
-
### What is CSS-in-JS? {#what-is-css-in-js}
43
+
### 什么是 CSS-in-JS? {#what-is-css-in-js}
44
44
45
-
"CSS-in-JS" refers to a pattern where CSS is composed using JavaScript instead of defined in external files. Read a comparison of CSS-in-JS libraries [here](https://github.com/MicheleBertoli/css-in-js).
_Note that this functionality is not a part of React, but provided by third-party libraries._ React does not have an opinion about how styles are defined; if in doubt, a good starting point is to define your styles in a separate `*.css`file as usual and refer to them using [`className`](/docs/dom-elements.html#classname).
React can be used to power animations. See [React Transition Group](https://reactcommunity.org/react-transition-group/)and[React Motion](https://github.com/chenglou/react-motion), for example.
0 commit comments