Skip to content

Instantly share code, notes, and snippets.

@Guria
Created September 19, 2016 19:04
Show Gist options
  • Save Guria/e8c03202213ada0a4d20e2df67920ef4 to your computer and use it in GitHub Desktop.
Save Guria/e8c03202213ada0a4d20e2df67920ef4 to your computer and use it in GitHub Desktop.
HTML5 / CSS3 Circle with Partial Border
/**
* 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: '';
}
<!-- content to be placed inside <body>…</body> -->
<div class='circle'>
<div class='arc'>&rt;</div>
</div>
{"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