Last active
July 3, 2020 12:01
-
-
Save johnlewisdesign/d52d0d135104c31625ef132383e0d772 to your computer and use it in GitHub Desktop.
A Yin Yang in pure css
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
#yin-yang { | |
width: 96px; | |
box-sizing: content-box; | |
height: 48px; | |
background: #eee; | |
border-color: red; | |
border-style: solid; | |
border-width: 2px 2px 50px 2px; | |
border-radius: 100%; | |
position: relative; | |
} | |
#yin-yang:before { | |
content: ""; | |
position: absolute; | |
top: 50%; | |
left: 0; | |
background: #eee; | |
border: 18px solid red; | |
border-radius: 100%; | |
width: 12px; | |
height: 12px; | |
box-sizing: content-box; | |
} | |
#yin-yang:after { | |
content: ""; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
background: red; | |
border: 18px solid #eee; | |
border-radius: 100%; | |
width: 12px; | |
height: 12px; | |
box-sizing: content-box; | |
} |
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
<html> | |
<head> | |
<title="Yin Yang pure CSS"> | |
</head> | |
<body><div id="yin-yang"> </div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment