Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
How to write inline CSS in react.js
<div className="p-3" style={{backgroundImage: linear-gradient(to right top,#FB0712,#124FEB)}}>
getting an error(Error: error: Expected ',', got 'right') with the above code
linear-gradient(to right top,#FB0712,#124FEB)
"linear-gradient(to right top,#FB0712,#124FEB)"
I had used something like below and it worked for me.
<div style={{backgroundImage: `linear-gradient(to right top,#FB0712,#124FEB)`, height: '20px', width: '20px'}}/>
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
linear-gradient(to right top,#FB0712,#124FEB)with quotes to make it a valid string:"linear-gradient(to right top,#FB0712,#124FEB)"