在悬停时禁用显示链接

时间:2014-10-21 13:12:00

标签: html css

h2标记下的ahref链接仅在您将鼠标悬停在该位置时显示,否则会消失。如何消除消失的行为?我想让它变得正常并且一直出现。

这是Html

<div class="doctor_name">
  <h1> {{doctor.name}} </h1>

  <h2 style="text-transform: uppercase;"> {{doctor.specialization.name}} </h2>
 <h2> <a href="/clinic/{{clinic.slug}}/">{{clinic.name}}</a></h2>
  <h2 style="color: grey;"> {{doctor.clinic.address_normal}} </h2>

    

这是css

.doctor_name > h2 {
    margin-top: -1px;
    font-size: 1.20em;
    margin-bottom: 3px;
    margin-left: 1px;
}

.doctor_name{
    width: 303px;
    margin-left: 200px;
    margin-top: -234px;
    padding-bottom: 100px;
}

.doctor_name > h1{
    margin-top: 10px;
    font-size: 2.2em;
}

2 个答案:

答案 0 :(得分:1)

问题: 链接在白色背景上是白色的。

解决方案: 给它css着色和装饰在相关位置内脱颖而出。显然,一旦你改变颜色,它就会被看到,但是你非常欢迎更换/添加更多的款式!

h2 > a{
    color: green;
    text-decoration: underline;
}

答案 1 :(得分:0)

试试这个

h2 > a{ 
    color:red; 
    text-decoration:underline; 
}

如果不起作用,请尝试此

h2 > a{ 
    color:red!important; 
    text-decoration: underline!important; 
}
相关问题