gpt4 book ai didi

reactjs - Material-ui Typography with router link always underlined

转载 作者:行者123 更新时间:2023-12-05 01:31:04 30 4
gpt4 key购买 nike

当我将 React-Router 链接添加到 Typography 元素时,我似乎无法摆脱下划线,即使 underline="none""hover"被选中。

来自 useStyles:

title: {
display: "none",
[theme.breakpoints.up("sm")]: {
display: "block",
},
},

来自渲染(Typography 元素在工具栏中,不确定这是否有所不同):

          <Typography
className={classes.title}
variant="h6"
noWrap
component={Link}
to="/"
color="textPrimary"
underline="none"
>
Your Text Here
</Typography>

在浏览器中: enter image description here

最佳答案

您需要在链接 CSS 中指定以下内容:

textDecoration: "none",
boxShadow: "none"

关于reactjs - Material-ui Typography with router link always underlined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66554678/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com