Created
November 10, 2013 10:20
-
-
Save xnimorz/7396417 to your computer and use it in GitHub Desktop.
Новое решение CSS Basics
This file contains 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
body,html | |
{ | |
width: 100%; | |
} | |
.navigation | |
{ | |
list-style: none; | |
font-family: Helvetica,Verdana; | |
font-weight: bold; | |
font-size: 12px; | |
width:100%; | |
margin:0; | |
padding: 0; | |
display: table; | |
table-layout: fixed; | |
} | |
.navigation__button-wrapper | |
{ | |
display: table-cell; | |
} | |
.navigation__button | |
{ | |
text-align: center; | |
height: 30px; | |
text-decoration: none; | |
background-color: #d3d3d3; | |
line-height: 30px; | |
color:#fefefe; | |
display: block; | |
margin-right: 12px; | |
} | |
.navigation__button:before | |
{ | |
float: left; | |
content:""; | |
margin-left: -10px; | |
width: 0px; | |
height: 0px; | |
color:#d3d3d3; | |
border-top: 15px solid; | |
border-left: 10px solid transparent; | |
border-bottom: 15px solid; | |
} | |
.navigation__button:after | |
{ | |
vertical-align: middle; | |
float: right; | |
content:""; | |
margin-right: -10px; | |
width: 0px; | |
height: 0px; | |
color:#d3d3d3; | |
border-top: 15px solid transparent; | |
border-left: 10px solid; | |
border-bottom: 16px solid transparent;; | |
} | |
.navigation__button-wrapper:first-child .navigation__button | |
{ | |
-moz-border-radius: 3px 0 0 3px; | |
-webkit-border-radius: 3px 0 0 3px; | |
-o-border-radius: 3px 0 0 3px; | |
-ms-border-radius: 3px 0 0 3px; | |
border-radius: 3px 0 0 3px; | |
} | |
.navigation__button_last | |
{ | |
border-right: none; | |
-moz-border-radius: 0 3px 3px 0; | |
-webkit-border-radius: 0 3px 3px 0; | |
-o-border-radius: 0 3px 3px 0; | |
-ms-border-radius: 0 3px 3px 0; | |
border-radius: 0 3px 3px 0; | |
} | |
.navigation__button-wrapper:first-child .navigation__button:before | |
{ | |
content: none; | |
} | |
.navigation__button_last:after | |
{ | |
content: none; | |
} | |
.navigation__button_complete | |
{ | |
color: #50b4ec; | |
background-color: #c4eaf8; | |
} | |
.navigation__button_complete:after,.navigation__button_complete:before | |
{ | |
color: #c4eaf8; | |
} | |
.navigation__button_active | |
{ | |
background-color: #46a9e8; | |
} | |
.navigation__button_active:after,.navigation__button_active:before | |
{ | |
color: #46a9e8; | |
} |
This file contains 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
<ul class="navigation"> | |
<li class="navigation__button-wrapper"> | |
<a href="#" class="navigation__button navigation__button_complete">More than one word</a> | |
</li> | |
<li class="navigation__button-wrapper"> | |
<a href="#" class="navigation__button navigation__button_complete">Link</a> | |
</li> | |
<li class="navigation__button-wrapper"> | |
<span class="navigation__button navigation__button_active">Link</span> | |
</li> | |
<li class="navigation__button-wrapper"> | |
<span class="navigation__button">Link</span> | |
</li> | |
<li class="navigation__button-wrapper"> | |
<span class="navigation__button navigation__button_last">Link</span> | |
</li> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment