Last active
August 29, 2015 14:06
-
-
Save yaegaki/b2dbad3020c31f9c1ecc to your computer and use it in GitHub Desktop.
CSSで作図する ref: http://qiita.com/yaegaki/items/a1e518d16be9b85479b4
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
.square { | |
width: 100px; | |
height: 100px; | |
background: black; | |
} |
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
<div class="square"></div> |
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
.square-rotate { | |
width: 100px; | |
height: 100px; | |
background: black; | |
transform: rotate(45deg); | |
} |
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
<div class="square-rotate"></div> |
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
.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; | |
} |
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
<div class="mountain"></div> |
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
.four-circle { | |
width: 50px; | |
height: 50px; | |
border-radius: 25px; | |
background: black; | |
box-shadow: | |
60px 0, | |
0 60px, | |
60px 60px; | |
} |
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
<div class="four-circle"></div> |
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
.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; | |
} |
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
<div class="battery"></div> |
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
.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; | |
} |
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
<div class="battery"></div> |
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
.circle { | |
width: 100px; | |
height: 100px; | |
background: black; | |
border-radius: 50px; | |
} |
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
<div class="circle"></div> |
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
.square2 { | |
width: 100px; | |
height: 100px; | |
background: black; | |
border-radius: 40px 0 40px 0; /*左上,右下に40px*/ | |
} |
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
<div class="square2"></div> |
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
.triangle { | |
width: 0px; | |
height: 0px; | |
background: transparent; | |
border-bottom: 150px solid black; | |
border-left: 100px solid transparent; | |
border-right: 100px solid transparent; | |
} |
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
<div class="triangle"></div> |
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
.square-scale { | |
width: 100px; | |
height: 100px; | |
background: black; | |
transform: scale(2); | |
} |
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
<div class="square-scale"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment