2017-03-14 2 views

Répondre

0

: cible fonctionne sur l'ancre ne active pas vraiment besoin d'un sélecteur

essayez quelque chose comme:

html:

<a href="#my-data">anchor</a> 
<span id="my-data">My Data</span> 

css:

:target { 
    background-color: red; 
} 

voir un exemple de travail ici- https://jsfiddle.net/0fkh8n09/