Created
June 25, 2018 21:58
-
-
Save HereIsJade/5ee016c547ee23de9d23aa6f6d08fe8a to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/yelisuk
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Yingyang pseudo class</title> | |
<style id="jsbin-css"> | |
body{ | |
background: #666; | |
} | |
#yinyang{ | |
margin:40px auto; | |
width:200px; | |
height:200px; | |
border-radius:50%; | |
position: relative; | |
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 50%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 100%); | |
} | |
#yinyang::before{ | |
content:''; | |
width:20px; | |
height:20px; | |
border-radius:50%; | |
background:white; | |
position: absolute; | |
top:50px; | |
border: 40px solid black; | |
} | |
#yinyang::after{ | |
content:''; | |
width:20px; | |
height:20px; | |
border-radius:50%; | |
background:black; | |
position: absolute; | |
top:50px; | |
right:0px; | |
border: 40px solid white; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="yinyang"> | |
<div class="right"> | |
<div class="small-right"></div> | |
</div> | |
</div> | |
<script id="jsbin-source-css" type="text/css">body{ | |
background: #666; | |
} | |
#yinyang{ | |
margin:40px auto; | |
width:200px; | |
height:200px; | |
border-radius:50%; | |
position: relative; | |
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 50%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 100%); | |
} | |
#yinyang::before{ | |
content:''; | |
width:20px; | |
height:20px; | |
border-radius:50%; | |
background:white; | |
position: absolute; | |
top:50px; | |
border: 40px solid black; | |
} | |
#yinyang::after{ | |
content:''; | |
width:20px; | |
height:20px; | |
border-radius:50%; | |
background:black; | |
position: absolute; | |
top:50px; | |
right:0px; | |
border: 40px solid white; | |
} | |
</script> | |
</body> | |
</html> |
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{ | |
background: #666; | |
} | |
#yinyang{ | |
margin:40px auto; | |
width:200px; | |
height:200px; | |
border-radius:50%; | |
position: relative; | |
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 50%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 100%); | |
} | |
#yinyang::before{ | |
content:''; | |
width:20px; | |
height:20px; | |
border-radius:50%; | |
background:white; | |
position: absolute; | |
top:50px; | |
border: 40px solid black; | |
} | |
#yinyang::after{ | |
content:''; | |
width:20px; | |
height:20px; | |
border-radius:50%; | |
background:black; | |
position: absolute; | |
top:50px; | |
right:0px; | |
border: 40px solid white; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment