有没有办法用字符串而不是对象格式来编写内联css?
我试过了,但显然不起作用:
<div style={"color:red;font-weight:bold"}> Hello there </div>
我为什么要这么做?
I usually write some inline css first and once it looks good in the browser I copy paste that inline into my .scss
file
but if I use objects I'll first have to convert them into css format and then paste them into my file which would be really tedious
(如果不可能,我也愿意使用vscode扩展来将对象转换为css)