{{ }}.
Since the inline CSS is written in a JavaScript object, properties with two names, like background-color, must be written with camel case syntax.
Use backgroundColor instead of background-color:
<h3 style={{color:"red"}}>Hello Style!</h3>
|
mystyle:
const mystyle = {
color: "white",
backgroundColor: "DodgerBlue",
padding: "10px",
fontFamily: "Arial"
};
|
|
My wife is always trying to get rid of me. Last night she told me to put the garbage out. I told her I already did. She told me to go keep an eye on it. — Rodney Dangerfield on marriage |