如何去掉 React Router 的 Link 组件的下划线?

新手上路,请多包涵

我有以下内容:

在此处输入图像描述

我如何摆脱蓝色下划线?

代码如下:

 <Link to="first"><MenuItem style={{paddingLeft: 13, textDecoration: 'none'}}> Team 1 </MenuItem></Link>

MenuItem 组件来自 http://www.material-ui.com/#/components/menu

原文由 Jo Ko 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 1.3k
1 个回答

添加css样式

a:link {
 text-decoration: none;
 color: #cc850a;
 }

 a:visited {
 text-decoration: none;
 color: #cc850a;
 }

 a:hover {
 text-decoration: none;
 color: #47a1ad;
 }

 a:active {
 text-decoration: none;
 }

原文由 Hitesh Sahu 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题