Created
February 13, 2017 19:14
-
-
Save rozanovz/0c62a786aa1be0e68caab0e1cd68008f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Document</title> | |
| <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> | |
| <style> | |
| body{ | |
| padding: 0; | |
| margin: 0; | |
| } | |
| ul{ | |
| list-style: none; | |
| background: lightblue; | |
| width: 100%; | |
| padding: 10px; | |
| } | |
| .main>li{ | |
| display: inline-block; | |
| padding: 5px 10px; | |
| border-right: 1px solid gray; | |
| margin-right: -5px; | |
| cursor: pointer; | |
| transition: all ease-in-out .3s; | |
| } | |
| .main>li:hover{ | |
| color: gray; | |
| } | |
| li:last-child{ | |
| border: 0px; | |
| } | |
| .has-sub{ | |
| position: relative; | |
| } | |
| .sub{ | |
| position: absolute; | |
| background: white; | |
| padding: 0; | |
| top: 38px; | |
| left: 0px; | |
| /* display: none; */ | |
| } | |
| .sub li { | |
| border: 1px solid lightgray; | |
| padding: 10px; | |
| } | |
| .has-sub:hover .sub{ | |
| display: block; | |
| } | |
| .sub-sub { | |
| position: absolute; | |
| right: -77px; | |
| top:39px; | |
| padding: 0; | |
| background: coral; | |
| display: none; | |
| } | |
| .sub>li:nth-child(2):hover .sub-sub{ | |
| display: block; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="nav"> | |
| <ul class="main"> | |
| <li>Home</li> | |
| <li class="has-sub"> | |
| Portfolio | |
| <ul class="sub"> | |
| <li>first</li> | |
| <li> | |
| second | |
| <ul class="sub-sub"> | |
| <li>sub-li</li> | |
| <li>sub-li</li> | |
| <li>sub-li</li> | |
| </ul> | |
| </li> | |
| <li>third</li> | |
| </ul> | |
| </li> | |
| <li>Contacts</li> | |
| </ul> | |
| </div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment