Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Styling React Using CSS

//Use backgroundColor instead of background-color:
const Header = () => {
  return (
    <>
      <h1 style={{backgroundColor: "lightblue"}}>Hello Style!</h1>
      <p>Add a little style!</p>
    </>
  );
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Styling #React #Using #CSS
ADD COMMENT
Topic
Name
9+2 =