Created
September 19, 2016 19:04
-
-
Save Guria/e8c03202213ada0a4d20e2df67920ef4 to your computer and use it in GitHub Desktop.
HTML5 / CSS3 Circle with Partial Border
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
/** | |
* HTML5 / CSS3 Circle with Partial Border | |
* http://stackoverflow.com/q/13059190/1397351 | |
*/ | |
* { margin: 0; padding: 0; } | |
.circle { | |
position: relative; | |
margin: 7em auto; | |
width: 16em; height: 16em; | |
border-radius: 50%; | |
background: lightblue; | |
} | |
.arc { | |
overflow: hidden; | |
position: absolute; | |
top: -1em; right: 50%; bottom: 50%; left: -1em; | |
transform-origin: 100% 100%; | |
transform: rotate(45deg) skewX(30deg); | |
} | |
.arc:before { | |
box-sizing: border-box; | |
display: block; | |
border: solid 1em navy; | |
width: 200%; height: 200%; | |
border-radius: 50%; | |
transform: skewX(-30deg); | |
content: ''; | |
} |
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
<!-- content to be placed inside <body>…</body> --> | |
<div class='circle'> | |
<div class='arc'>&rt;</div> | |
</div> |
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
{"view":"split-vertical","fontsize":"80","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment