无法从:hover元素中删除下划线,并且无法在chrome inspector中看到text-decoration:underline

悬停时我的按钮显示下划线。看着chrome检查器,我的CSS被忽略了,但是没有其他CSS正在设置

a:hover{text-decoration:none}
Chrome检查器的

此处的屏幕截图

无法从:hover元素中删除下划线,并且无法在chrome inspector中看到text-decoration:underline

下面是两个摘要,更多的是HTML和CSS

HTML

<div class='container'>
      <br />
      <br />
      <h1 class='header center  red-text text-lighten-1'>INFOSHOT</h1>
      <div class='row center'>
        <h5 class='header col s12 light'>Better and Easier Research</h5>
      </div>
      <div class='row center'>
        <a
          href='/register'
          id='download-button'
          class='btn-large waves-effect waves-light  red lighten-1'>
          Get Started
        </a>

      </div>

CSS

text-decoration: none;
color:white;
}

app.css


    /* CSS RESET */
/* @import '@atlaskit/css-reset'; */

/* Fonts */
@import url('https://fonts.googleapis.com/css?family=Roboto');
/* Schemes */
/* @import './css/globalSettings.css'; */
/* Materialize */
@import url('https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

/* Custom CSS */
@import './css/overides.css';```

yanghf0728 回答:无法从:hover元素中删除下划线,并且无法在chrome inspector中看到text-decoration:underline

尝试

a:hover{text-decoration:none}

不是这个

a:hover:{text-decoration:none}
,

尝试:

a.btn:hover{ text-decoration: none !important; } or
a.btn:hover{ text-decoration: none; } 

谢谢。

本文链接:https://www.f2er.com/3168556.html

大家都在问