Answers for "react set element style"

49

inline style jsx

//Multiple inline styles
<div style={{padding:'0px 10px', position: 'fixed'}}>Content</div>
Posted by: Guest on September-09-2020
27

inline style 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

using inline styling in React

function MyComponent(){
2
3return <div style={{ color: 'blue', lineHeight : 10, padding: 20 }}> Inline Styled Component</div>
4
5}
Posted by: Guest on May-02-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language