【问题标题】:React - textDecoration:'none' not removing underline in linkReact - textDecoration:'none'不删除链接中的下划线
【发布时间】:2018-10-29 00:41:52
【问题描述】:

所以我尝试使用 textDecoration:'none' 从链接中删除下划线,但由于某种原因,即使使用 !important 后链接也不会消失。有谁知道它可能是什么?我很菜鸟,所以它一定很简单,呵呵。 干杯!

index.tsx:

<div className={classes.register}><div className={classes.conta}>Não possui uma conta? <a href='#'> Cadastre-se</a></div></div>


style.jss.ts:

register: {
    position: 'relative',
    width:'100%',
    height:'50px',
    borderRadius:'10px',
    backgroundColor: '#f1f5fb',
    border: 'solid 1px #e6eaee',
    paddingTop:'15px'
  },

  a:{
    textDecoration:'none'

【问题讨论】:

    标签: javascript html reactjs frontend


    【解决方案1】:

    您应该将“a”类应用到您的 a 组件。

    <a href='#' className={classes.a}> Cadastre-se</a>
    

    【讨论】:

      猜你喜欢
      • 2015-11-10
      • 2013-11-10
      • 2014-07-06
      • 2015-02-26
      • 1970-01-01
      • 1970-01-01
      • 2012-03-06
      • 1970-01-01
      • 2011-02-16
      相关资源
      最近更新 更多