- 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' }} />
推薦閱讀
- 物聯(lián)網(wǎng)標(biāo)準(zhǔn)化指南
- 智慧城市:大數(shù)據(jù)、互聯(lián)網(wǎng)時代的城市治理(第4版)
- 連接未來:從古登堡到谷歌的網(wǎng)絡(luò)革命
- 物聯(lián)網(wǎng)安全:理論、實踐與創(chuàng)新
- Hands-On Chatbot Development with Alexa Skills and Amazon Lex
- 物聯(lián)網(wǎng)+BIM:構(gòu)建數(shù)字孿生的未來
- 物聯(lián)網(wǎng)信息安全
- Windows Server 2003 Active Directory Design and Implementation: Creating, Migrating, and Merging Networks
- PLC、現(xiàn)場總線及工業(yè)網(wǎng)絡(luò)實用技術(shù)速成
- 光纖通信系統(tǒng)與網(wǎng)絡(luò)(修訂版)
- INSTANT LinkedIn Customization How-to
- Getting Started with tmux
- 圖神經(jīng)網(wǎng)絡(luò)前沿
- 人際網(wǎng)絡(luò)
- 信息技術(shù)安全評估準(zhǔn)則:源流、方法與實踐