Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset="UTF-8">
- <link rel="stylesheet" href="styl.css" type="text/css">
- </head>
- <body>
- <ol id="menu">
- <li><a href="#">link - 1</a>
- <ul>
- <li><a href="#">link - 1</a>
- <li><a href="#">link - 2</a>
- <li><a href="#">link - 3</a>
- <li><a href="#">link - 4</a>
- <li><a href="#">link - 5</a>
- <li><a href="#">link - 6</a> </ul>
- </li><li><a href="#">link - 2</a>
- <ul>
- <li><a href="#">link - 1</a></li>
- <li><a href="#">link - 2</a></li>
- <li><a href="#">link - 3</a></li>
- <li><a href="#">link - 4</a></li>
- </ul>
- </li><li><a href="#">link - 3</a>
- <ul>
- <li><a href="#">link - 1</a>
- <li><a href="#">link - 2</a>
- <li><a href="#">link - 3</a>
- <li><a href="#">link - 4</a>
- <li><a href="#">link - 5</a>
- </ul>
- </li>
- </ol>
- </body>
- </html>
- C
- <style>
- #menu
- {
- width:400px;
- margin:0 auto;
- padding:0;
- list-style-type:none;
- background-color:#FDF;
- }
- #menu:after
- {
- content: '';
- display: block;
- clear: both;
- }
- #menu>li
- {
- float: left;
- }
- #menu>li:first-child
- {
- background-color: red;
- width: 30%;
- }
- #menu>li:first-child+li
- {
- background-color: green;
- width: 40%;
- }
- #menu>li:first-child+li+li
- {
- background-color: blue;
- width: 30%;
- }
- #menu>li>a
- {
- display:block;
- padding:15px;
- text-decoration:none;
- text-align:center;
- color:#000;
- background-color:#DDD;
- box-shadow:0 0 0 1px #FFF inset;
- background-image:linear-gradient(#FFF 0%, #EEE 30%, #DDD 70%, #FFF 100%);
- }
- #menu>li:hover>a
- {
- color:#00F;
- background-color:#FFF;
- background-image:none;
- }
- #menu>li
- {
- position:relative;
- }
- #menu>li>ul
- {
- width:100%;
- display:none;
- position:absolute;
- z-index:1;
- margin:0;
- padding:0;
- list-style-type:none;de
- background-color:#FFF;
- }
- #menu>li:hover>ul
- {
- display:block;
- }
- #menu>li>ul>li
- {
- box-shadow:0 -4px 4px -4px #AAA;
- }
- #menu>li>ul>li:first-child
- {
- box-shadow:none;
- }
- #menu>li>ul>li:last-child
- {
- box-shadow:0 -4px 4px -4px #AAA, 0 4px 4px -4px #AAA;
- }
- #menu>li>ul>li>a
- {
- display:block;
- text-decoration:none;
- padding:15px;
- color:#000;
- }
- #menu>li>ul>li:hover>a
- {
- color:#00F;
- background-color:#F0F0F0;
- background-image:linear-gradient(#FFF, #EEE, #FFF);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement