什么叫“返回的 json 数据”?什么数据?
const json = {
"color": "red",
"font-size": "16px"
};
const cssString = JSON.stringify(json).replace(/[\{\}\"]/g, "").replace(/\,/g, ";");
const styleNode = document.createElement('style');
styleNode.innerText = `body { ${cssString} }`;
document.head.appendChild(styleNode);