Skip to content

Instantly share code, notes, and snippets.

@yaegaki
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaegaki/b2dbad3020c31f9c1ecc to your computer and use it in GitHub Desktop.
Save yaegaki/b2dbad3020c31f9c1ecc to your computer and use it in GitHub Desktop.
.square {
width: 100px;
height: 100px;
background: black;
}
<div class="square"></div>
.square-rotate {
width: 100px;
height: 100px;
background: black;
transform: rotate(45deg);
}
<div class="square-rotate"></div>
.mountain {
margin-top: 100px;
width: 100px;
height: 30px;
background: black;
position: relative;
}
.mountain:before {
content: "";
display: block;
width: 80px;
height: 30px;
background: red;
top: -30px;
left: 10px;
position: absolute;
}
.mountain:after {
content: "";
display: block;
width: 50px;
height: 30px;
background: yellow;
top: -60px;
left: 25px;
position: absolute;
}
<div class="mountain"></div>
.four-circle {
width: 50px;
height: 50px;
border-radius: 25px;
background: black;
box-shadow:
60px 0,
0 60px,
60px 60px;
}
<div class="four-circle"></div>
.battery {
border: 8px solid black;
width: 50px;
height: 30px;
position: relative;
}
.battery:before {
content: "";
display: block;
position: absolute;
width: 10px;
height: 25px;
top: 3px;
left: 2px;
background: black;
box-shadow:
13px 0,
26px 0;
}
.battery:after {
content: "";
display: block;
position: absolute;
width: 10px;
height: 20px;
top: 6px;
left: 57px;
background: black;
}
<div class="battery"></div>
.battery {
border: 8px solid black;
width: 50px;
height: 30px;
position: relative;
}
.battery:before {
content: "";
display: block;
position: absolute;
width: 10px;
height: 20px;
top: 3px;
left: 2px;
background: black;
box-shadow:
0 4px,
13px 0,
13px 4px,
26px 0,
26px 4px,
56px 3px;
}
<div class="battery"></div>
.circle {
width: 100px;
height: 100px;
background: black;
border-radius: 50px;
}
<div class="circle"></div>
.square2 {
width: 100px;
height: 100px;
background: black;
border-radius: 40px 0 40px 0; /*左上,右下に40px*/
}
<div class="square2"></div>
.triangle {
width: 0px;
height: 0px;
background: transparent;
border-bottom: 150px solid black;
border-left: 100px solid transparent;
border-right: 100px solid transparent;
}
<div class="triangle"></div>
.square-scale {
width: 100px;
height: 100px;
background: black;
transform: scale(2);
}
<div class="square-scale"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment