Answers for "what do we use in jsx for adding styles to html elements? react"

27

react add inline styles in react

// You are actuallty better off using style props
// But you can do it, you have to double brace
// and camel-case the css properties
render() {
	return (
    	<div style={{paddingTop: '2em'}}>
      		<p>Eh up, me duck!</p>
      	</div>
    )
}
Posted by: Guest on March-14-2020
1

jsx style styling

style={{color: "white",
        backgroundColor: '#f1356d',
        borderRadius: '8px'
       }}
Posted by: Guest on March-23-2022

Code answers related to "what do we use in jsx for adding styles to html elements? react"

Code answers related to "Javascript"

Browse Popular Code Answers by Language