In your specific case, you can do something like this:
a:focus div {
opacity:0.6;
}
Note that your a
should have some tabindex
assigned to be focusable.
Demo.
Updated: Looks like giving a div
some tabindex
also make it focusable. Although I'm not sure if this works cross-browser. So you can use your original code and just add some tabindex
for the div
instead of the a
.