2017-04-18 73 views
0

我不想禁用我的主頁中的屬性選擇器和pointer-events: disable;鏈接,但我想保持:懸停效果。禁用指針事件的鏈接,但保持活動:懸停事件

這是CSS:

Section#thumbnails .thumb a[title="Yorokobu"]{ 
    pointer-events: none !important; 
    display: block !important; 
    cursor: default; 
    } 

而這個網站:www.rafagarces.com/work

謝謝!

回答

1

這裏你的答案:

section#thumbnails .thumb a[title="Yorokobu"]:hover { 
    pointer-events: visible !important; 
    cursor: auto; 
} 
+0

這不工作:/ –

1

您可以在:hover狀態添加到父元素。

section#thumbnails .thumb a[title="Yorokobu"] { 
 
    pointer-events: none !important; 
 
    display: block !important; 
 
    cursor: default; 
 
} 
 

 
section#thumbnails .thumb:hover a[title="Yorokobu"] { 
 
    color: red; 
 
}
<section id="thumbnails"> 
 
    <span class="thumb"> 
 
    <a title="Yorokobu"> 
 
     Test 
 
    </a> 
 
    </span> 
 
</section>