Answers for "how to use the style in react"

3

css react

import "./FileName.css"; // import your css file

// or css inside your react file
//for example:
const MyDiv = React.createClass({
  render: function() {
    const style = {
      color: 'white',
      fontSize: 200
    };
    
    return <div style={style}> Have a good and productive day! </div>;
  }
});
Posted by: Guest on February-07-2022
42

inline style jsx

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

Code answers related to "how to use the style in react"

Code answers related to "Javascript"

Browse Popular Code Answers by Language