- React Design Patterns and Best Practices(Second Edition)
- Carlos Santana Roldán
- 74字
- 2021-06-24 15:43:38
Style
A pretty significant difference is the way the style attribute works. We will look at how to use it in more detail in Chapter 7, Make Your Components Look Beautiful, but now we will focus on the way it works.
The style attribute does not accept a CSS string as the HTML parallel does, but it expects a JavaScript object where the style names are camelCased:
<div style={{ backgroundColor: 'red' }} />
推薦閱讀
- 網絡云百問百答
- 網絡故障現場處理實踐(第4版)
- Go Web Scraping Quick Start Guide
- 互聯網基礎資源技術與應用發展態勢(2021—2023)
- 5G技術與標準
- 紅藍攻防:構建實戰化網絡安全防御體系
- 物聯網的機遇與利用
- 世界互聯網發展報告2021
- 新媒體交互藝術
- 通信系統實戰筆記:無處不在的信號處理
- Architecting Data:Intensive Applications
- 學術虛擬社區用戶社會化交互行為研究
- Learning IoT with Particle Photon and Electron
- Next.js Quick Start Guide
- Building Applications with Spring 5 and Kotlin