我有一个基本 CSS 定义了这个:
a:hover, a:focus {
color: black;
}
我希望有一个特定的链接可以覆盖并且不会触发焦点,但仍会触发悬停。
我怎样才能做这样的事情来覆盖颜色设置?
a:focus{
color: none;
}
我试过 color:transparent 无济于事,焦点仍然触发。
最佳答案
试试这个
a:hover{
color:green;
}
.class:hover, .class:focus {
color: red;
}
<a href="#" class="class">dsadsfdsfsd</a>
<a href="#">dsadsfdsfsd</a>
关于html - 禁用 :focus and a:active color?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39202926/