Created
October 29, 2015 14:13
-
-
Save MatthewBarker/2b16875ee5d6dc35bab4 to your computer and use it in GitHub Desktop.
CSS Navigation Compass
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
/* Compass */ | |
.compass { | |
background: #eee; | |
width: 200px; | |
height: 200px; | |
border-radius: 100%; | |
border: 5px solid #666; | |
position: relative; | |
} | |
.arrow { | |
width: 10px; | |
height: 200px; | |
left: 95px; | |
position: absolute; | |
transform:rotate(90deg); | |
} | |
.north { | |
height: 100px; | |
background: #e00; | |
border-top-left-radius: 100%; | |
border-top-right-radius: 100%; | |
} | |
.south { | |
height: 100px; | |
background: #fff; | |
border-bottom-left-radius: 100%; | |
border-bottom-right-radius: 100%; | |
top: 100px; | |
} | |
.pivot { | |
width: 20px; | |
height: 20px; | |
background: #e00; | |
border-radius: 100%; | |
position: absolute; | |
left: 90px; | |
top: 90px; | |
} | |
.north, .south, .pivot { | |
-moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.75); | |
-o-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.75); | |
-webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.75); | |
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.75); | |
} |
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
<div class="compass"> | |
<div class="arrow"> | |
<div class="north"></div> | |
<div class="south"></div> | |
</div> | |
<div class="pivot"></div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment