Beispiel:CSS grundlagen focus hover active.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche
<!doctype html>
<html lang="de">
  <head>
    <meta charset="utf-8">
    <title>CSS-Beispiel: Link-Pseudoklassen</title>
    <style>
      a:focus   { background-color: red; color: black;}
      a:hover   { background-color: blue; color: white; }
      a:active  { background-color: yellow; color: black; }
      body      { font: 1.5rem sans-serif; line-height: 2; }
      a         { padding: .2em; }
    </style>
  </head>
  <body>
    <ul>
      <li><a href="https://selfhtml.org">SELFHTML</a></li>
      <li><a href="https://forum.selfhtml.org">SELFHTML Forum</a></li>
      <li><a href="https://wiki.selfhtml.org">SELFHTML Wiki</a></li>
    </ul>
  </body>
</html>