Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 反应JSS风格的全局_Css_Reactjs_Jss - Fatal编程技术网

Css 反应JSS风格的全局

Css 反应JSS风格的全局,css,reactjs,jss,Css,Reactjs,Jss,我用它来建立全球风格。例如: export default { '@global': { body: { margin: 0, fontFamily: '"Lobster", cursive, Roboto, "sans-serif"', }, }, }; 上面的代码对我来说很有用,但当我想为css设置这样的样式时,它就不起作用了 export default { '@global': { body: ..., '&

我用它来建立全球风格。例如:

export default {
  '@global': {
    body: {
      margin: 0,
      fontFamily: '"Lobster", cursive, Roboto, "sans-serif"',
    },
  },
};
上面的代码对我来说很有用,但当我想为css设置这样的样式时,它就不起作用了

export default {

 '@global': {
    body: ...,
    '& *:before, & *:after': {
      boxSizing: 'border-box',
    },
  },
};

我搜索了他们的github问题,搜索了谷歌,搜索了他们的文档,但仍然没有找到这个问题的答案。请帮帮我,谢谢大家

实际上还不清楚你们的问题是什么。您能否澄清“it不起作用”,提供全局声明的用法。相反,这个全局样式表的样式表的“注入”。我只想为*:after和*:before设置全局样式,但上面的代码对我不起作用。