Фиксированное вертикальное меню на CSS3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
*, :before, :after { box-sizing: border-box; } .unstyled { list-style: none; padding: 0; margin: 0; } .unstyled a { text-decoration: none; } .list-inline { overflow: hidden; } .list-inline li { float: left; } .header { position: fixed; left: 0; top: 0; bottom: 0; width: 17.5em; background: #35302D; } .logo { text-align: center; padding: 0; margin: 0; } .logo a { display: block; padding: 1em 0; color: #DFDBD9; text-decoration: none; transition: .15s linear color; } .logo a:hover { color: #fff; } .logo a:hover span { color: #DF4500; } .logo span { font-weight: 700; transition: .15s linear color; } .main-nav ul { border-top: solid 1px #3C3735; } .main-nav li { border-bottom: solid 1px #3C3735; } .main-nav a { padding: 1.1em 0; color: #DFDBD9; font-size: 20px; text-align: center; } .main-nav a:hover { color: #fff; } .social-links { border-bottom: solid 1px #3C3735; } .social-links li { width: 25%; border-left: solid 1px #3C3735; } .social-links li:first-child { border: none; } .social-links a { display: block; height: 5.5em; text-align: center; color: #555; font: 0.75em/5.5em "Source Sans Pro", Helvetica, Arial, sans-serif; } .social-links a:hover { color: #DFDBD9; } .list-hover-slide li { position: relative; overflow: hidden; } .list-hover-slide a { display: block; position: relative; z-index: 1; transition: .35s ease color; } .list-hover-slide a:before { content: ''; display: block; z-index: -1; position: absolute; left: -100%; top: 0; width: 100%; height: 100%; border-right: solid 5px #DF4500; background: #3C3735; transition: .35s ease left; } .list-hover-slide a.is-current:before, .list-hover-slide a:hover:before { left: 0; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<header class="header" role="banner"> <!-- <h1 class="logo"> <a href="#">Terence <span>Devine</span></a> </h1> --> <div class="nav-wrap"> <nav class="main-nav" role="navigation"> <ul class="unstyled list-hover-slide"> <li><a href="#">О нас</a></li> <li><a href="#">Наши работы</a></li> <li><a href="#">Обратная связь</a></li> <li><a href="#">Блог</a></li> </ul> </nav> <ul class="social-links list-inline unstyled list-hover-slide"> <li><a href="#">Твиттер</a></li> <li><a href="#">Гугл +</a></li> <li><a href="#">ГитХаб</a></li> <li><a href="#">Кодпен</a></li> </ul> </div> </header> |