我试图在我的页面上定位元素的后伪选择器.我正在为这个项目尝试JSS,到目前为止我是一个巨大的粉丝,但仍然很新.我选择了JSS之后遇到了麻烦.这是否可能,因为我认为这是在阅读文档时.
这是我的标记:
<Link to="about" className={classes.link}>About</Link>
我的JSS看起来像这样:
link: {
position: 'relative',
fontFamily: fonts.family.primary
'&:before': {
content: ' ',
position: 'absolute',
bottom: 0,
left: 50,
width: '100%',
height: '1rem',
display: 'block',
background:styles.colors.white
}
}
Run Code Online (Sandbox Code Playgroud)
如果任何熟悉JSS的人都可以提供帮助,那就太棒了!