1

I am trying use inline css in html content but it shows the error you see in the picture below; enter image description here

How can I use inline css in spfx webpart ?

0

1 Answer 1

2

Try it as below:

style={{"color" : "black"}}

If you want multiple attributes, try comma separated values as below:

style={{"color":"black","font-family":"verdana","font-size":"1.4rem"}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.