在向排版元素添加React-Router链接时,即使选择了underline="none"或"hover",我似乎也无法摆脱下划线。
来自useStyles:
title: {
display: "none",
[theme.breakpoints.up("sm")]: {
display: "block",
},
},从render (字体元素在工具栏中,不确定这是否有区别):
<Typography
className={classes.title}
variant="h6"
noWrap
component={Link}
to="/"
color="textPrimary"
underline="none"
>
Your Text Here
</Typography>在浏览器中:

发布于 2021-03-10 05:39:29
您需要在链接CSS中指定以下内容:
textDecoration: "none",
boxShadow: "none"发布于 2021-03-10 05:26:23
https://material-ui.com/api/typography/看起来<Typograpphy/>没有下划线属性,但是<Link>有https://material-ui.com/components/links/#links。你的文本应该是一个链接吗?也许你可以试试这样的方法:
<Typography
className={classes.title}
variant="h6"
noWrap
component={Link}
to="/"
color="textPrimary"
>
<Link href="#" underline="none">
Your Text Here
</Link>
</Typography>https://stackoverflow.com/questions/66554678
复制相似问题