在伪元素在 makestyles 中不起作用之前
Before pseudo element not working in makestyles
我在 React 中使用 makestyles,我不明白为什么之前的内容不显示。如果我把内容做成图片就可以了,但是它没有显示文字。
进一步澄清元素根本没有被渲染之前。
cardPoint: {
alignSelf: 'center',
justifySelf: 'start',
maxWidth: '250px',
position: 'relative',
"&:before": {
content: 'Look at me',
display: 'inline-block',
color: '#000',
},
}
我认为你必须将 'Look at me'
作为 '"Look at me"'
:
我在 React 中使用 makestyles,我不明白为什么之前的内容不显示。如果我把内容做成图片就可以了,但是它没有显示文字。
进一步澄清元素根本没有被渲染之前。
cardPoint: {
alignSelf: 'center',
justifySelf: 'start',
maxWidth: '250px',
position: 'relative',
"&:before": {
content: 'Look at me',
display: 'inline-block',
color: '#000',
},
}
我认为你必须将 'Look at me'
作为 '"Look at me"'
: