What does the + (plus sign) CSS selector mean?

Experience Level: Junior
Tags: CSS

Answer

The + (plus sign) CSS selector is used to select the elements that are placed immediately after the specified element but not inside the particular elements.

Example
<html>
  <body>
    <style>
      ul {
        display: none;
      }

      a:hover + ul {
        color: red;
        display: block;
      }
    </style>

    <a>Put mouse here</a>
    <ul>
      <li>This will be shown</li>
    </ul>
  </body>
</html>

Comments

No Comments Yet.
Be the first to tell us what you think.

Chat

Oh, the operator is not available. Leave us your comments. We will answer all your questions as soon as possible.

Comments

Anonymous
Καλησπέρα.
Anonymous
the infinteis -3/15 so 1triition / infinet
Anonymous
e
Anonymous
<a href="https://inspirum.pl "
Anonymous
[url]https://inspirum.pl[/url]
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e