0

Let's say I have some DOM like this:

<div class="container">
    <a class="one">Go to One</a>
    <a class="two">Go to Two</a>
</div>

How do I select both <a> when I hover on either one of <a> without using their Parent Container?

I was able to do it by using their parent <div>, like this:

.container:hover a.one,
.container:hover a.two {
    color: blue;
}

.. it was working.

But I don't want to use their Parent Container here.

Question

Is it possible to select both SELF + Other Element (without using their Parent Container)?

夏期劇場
  • 16,986
  • 42
  • 131
  • 213

0 Answers0