我正在尝试用户界面反应
这是我的scss(将鼠标悬停在.content上,而.replyBtn可以看到:可见):
.content {
&:hover {
.replyBtn {
visibility: visible
}
}
}
.replyBtn {
visibility: hidden;
}
JSS:怎么样?
const useStyles = makeStyles(theme => ({
content: {
'&:hover': {
// how to change reply btn visibility?
}
},
replyBtn: {
visibility: hidden
}
}));
谢谢
答案 0 :(得分:0)
在此示例中,replyBtn是css类:
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
答案 1 :(得分:0)
content: {
'&:hover $replyBtn': {
visibilty: 'visible'
}
},
replyBtn: {
visibility: 'hidden'
}
您应该看到以下内容:https://pantaley.com/blog/Start-your-JSS-journey-with-the-selectors-cheat-sheet/