How can I change the background color of the .arrow-tip class when hovering over the first <li>
? Can you provide me with the correct CSS rule?
Here is the HTML code:
<nav>
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
</nav>
<div class="arrow-tip">A triangle tip for the nav menu</div>
And here is the CSS code:
nav > ul > li:nth-child(1):hover ~ .arrow-tip {
background-color: #FF0;
}
I am seeking a solution that uses PURE CSS. Can you help with this?