CSS selector based on a:target -
this html:
<p class="define"><a class="term" href="#jump" name="jump">jump</a> - description</p> when browser jumps #jump want highlight .define class. if do;
a.term:target { background-color: #ffa; -webkit-transition: 1s linear; } i of course highlight a. how modify complete p? tried couple of variants 1 below, none of them work.
a.term:target .define { stuff here }
a.term:target p.define { stuff here }
a.term:target p { stuff here }
jsfiddle: http://jsfiddle.net/vvppy/
you can't modify parent of element using css. have use javascript alternative.
Comments
Post a Comment