Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CSS-Teil:
- nav {
- position:relative;
- background:#48D1CC;
- }
- nav ul {
- padding:0px;
- margin:0px;
- height:em;
- font-size:18pt;
- margin-left:35px;
- }
- nav ul li {
- position: relative;
- list-style: none;
- display: inline;
- cursor:pointer;
- transition: all 500ms;
- padding-left: 6px;
- padding-right: 6px;
- padding-top: 3px;
- padding-bottom: 3px;
- }
- nav ul li a:link {
- color: black;
- text-decoration: none;
- }
- nav ul li a:visited {
- color: black;
- text-decoration: none;
- }
- nav ul li a:hover {
- color: black;
- text-decoration: none;
- }
- nav ul li a:active {
- color: black;
- text-decoration: none;
- }
- nav ul li:hover {
- background: lightblue;
- }
- nav ul li ul {
- font-size: 14pt;
- position: absolute;
- top: auto;
- left: 0;
- height: 0px;
- opacity: 0;
- overflow: hidden;
- background:#48D1CC
- }
- nav ul li:hover ul {
- height: auto;
- opacity: 1;
- overflow: visible;
- transition: all 500ms;
- }
- nav ul li ul li {
- display: block;
- }
- HTML-Teil:
- <!DOCTYPE html>
- <html lang="de">
- <head>
- <title>Test</title>
- <meta charset="UTF-8">
- <link rel="stylesheet" href="standard.css">
- <link rel="stylesheet" href="menu.css">
- <link rel="stylesheet" href="divstyles.css">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
- </head>
- <body>
- <div id="main">
- <h1>Test Hauptüberschrift</h1>
- <hr class="top">
- <nav>
- <ul>
- <li><a href="index.html">Startseite</a></li>
- <li><a href=".html">Test</a></li>
- <li>
- <a href=".html">Test 2</a>
- <ul>
- <li><a href=".html">Untertest </a></li>
- <li><a href=".html">Untertest 2</a></li>
- <li><a href=".html">Untertest 3</a></li>
- </ul>
- </li>
- <li><a href=".html">Impressum</a></li>
- </ul>
- </nav>
- <hr class="standard">
- <div id="text_1">
- <p>
- Dies ist der erste Text auf dieser Haupteite.<br>
- Dies ist nun die zweite Zeile auf dieser Hauptseite.
- </p>
- </div>
- <hr class="standard">
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment