JSX解決方案
- JSX
- 一種可以在JavaScript代碼中直接書寫HTML標(biāo)簽的語法糖.依舊為JavaScript,通過翻譯器翻譯為js.
- JSX is an XML-like syntax extension to ECMAScript without any defined semantics. It's NOT intended to be implemented by engines or browsers. It's NOT a proposal to incorporate JSX into the ECMAScript spec itself. It's intended to be used by various preprocessors (transpilers) to transform these tokens into standard ECMAScript.
Flexbox布局
為ccs語法,只是屬性名該用了駝峰命名
- flexDirection 排列方向, 值: column (默認值)、row衩藤、row-reverse
- flexWrap 是否換行,值: nowrap(默認值)吧慢、wrap、wrap-reverse
- justifyContent 主軸上的位置 flexDirection決定哪條為主軸
- alignItems: 次軸上的位置
- alignSelf: 定義flex子項單獨在側(cè)軸(縱軸)方向上的對齊方式赏表。
參考: