How to get rid of underline for Link component of React Router?

后端 未结 17 2553
独厮守ぢ
独厮守ぢ 2020-12-23 00:16

I have the following:

How do I get rid of the blue underline? The code is below:



        
17条回答
  •  一生所求
    2020-12-23 00:39

    I have resolve a problem maybe like your. I tried to inspect element in firefox. I will show you some results:

    1. It is only the element I have inspect. The "Link" component will be convert to "a" tag, and "to" props will be convert to the "href" property:

    1. And when I tick in :hov and option :hover and here is result:

    As you see a:hover have text-decoration: underline. I only add to my css file:

    a:hover {
     text-decoration: none;
    }
    

    and problem is resolved. But I also set text-decoration: none in some another classes (like you :D), that may be make some effects (I guess).

提交回复
热议问题