Skip to content

Instantly share code, notes, and snippets.

@mysteryven
Created March 10, 2018 01:52
Show Gist options
  • Save mysteryven/096632bea6ed6fa1aaf76f5d39c649fe to your computer and use it in GitHub Desktop.
Save mysteryven/096632bea6ed6fa1aaf76f5d39c649fe to your computer and use it in GitHub Desktop.
// source https://jsbin.com
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.box {
width: 100px;
height: 100px;
border: 1px solid black;
border-radius: 50%;
background: linear-gradient(to bottom, rgb(255,255,255) 0%,rgb(255,255,255) 51%,rgb(0,0,0) 51%,rgb(0,0,0) 100%);
position: relative;
}
.yin {
width: 50px;
height: 50px;
background:black;
position: absolute;
border-radius: 50%;
top: 25%;
left: 0;
}
.yang {
width: 50px;
height: 50px;
background: white;
position: absolute;
top: 25%;
left: 50%;
border-radius: 50%;
}
.circleYin {
width: 10px;
height: 10px;
border-radius: 50%;
position: absolute;
background: white;
top: 42%;
left: 37%;
}
.circleYang {
width: 10px;
height: 10px;
border-radius: 50%;
position: absolute;
background: black;
top: 42%;
right: 37%;
}
</style>
</head>
<body>
<div class="box">
<div class="yin">
<div class="circleYin"></div>
</div>
<div class="yang">
<div class="circleYang"></div>
</div>
</div>
<script id="jsbin-source-css" type="text/css">.box {
width: 100px;
height: 100px;
border: 1px solid black;
border-radius: 50%;
background: linear-gradient(to bottom, rgb(255,255,255) 0%,rgb(255,255,255) 51%,rgb(0,0,0) 51%,rgb(0,0,0) 100%);
position: relative;
}
.yin {
width: 50px;
height: 50px;
background:black;
position: absolute;
border-radius: 50%;
top: 25%;
left: 0;
}
.yang {
width: 50px;
height: 50px;
background: white;
position: absolute;
top: 25%;
left: 50%;
border-radius: 50%;
}
.circleYin {
width: 10px;
height: 10px;
border-radius: 50%;
position: absolute;
background: white;
top: 42%;
left: 37%;
}
.circleYang {
width: 10px;
height: 10px;
border-radius: 50%;
position: absolute;
background: black;
top: 42%;
right: 37%;
}</script>
</body>
</html>
.box {
width: 100px;
height: 100px;
border: 1px solid black;
border-radius: 50%;
background: linear-gradient(to bottom, rgb(255,255,255) 0%,rgb(255,255,255) 51%,rgb(0,0,0) 51%,rgb(0,0,0) 100%);
position: relative;
}
.yin {
width: 50px;
height: 50px;
background:black;
position: absolute;
border-radius: 50%;
top: 25%;
left: 0;
}
.yang {
width: 50px;
height: 50px;
background: white;
position: absolute;
top: 25%;
left: 50%;
border-radius: 50%;
}
.circleYin {
width: 10px;
height: 10px;
border-radius: 50%;
position: absolute;
background: white;
top: 42%;
left: 37%;
}
.circleYang {
width: 10px;
height: 10px;
border-radius: 50%;
position: absolute;
background: black;
top: 42%;
right: 37%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment