如何解决为什么CSS中未激活“内容”?
在react CSS HeaderLink const中,我想在使用鼠标悬停时设计带有下划线效果的链接,但是刚发生的事情是单词变成红色并禁止内容。如何解决?
const HeaderLink = props => {return (
<Link
css={{
fontSize: "0.9rem",fontWeight: 300,color: theme.colors.lightText,letterSpacing: 0.5,transition: "all 200ms ease-in","&:after": {
position: "absolute",width: "0%",content: ".",color: "transparent",background: "red",height: "1px",transition: "all 0.4s ease-in",},"&:hover": {
color: "#ec2024","&::after": {
width: "100%",}}
{...props}
>
</Link >
) }
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。