Last active
November 25, 2019 19:47
-
-
Save veritstudio/74dbbe6331e5bfa37ddea41bc8cc3b84 to your computer and use it in GitHub Desktop.
Build shapes with CSS only
This file contains hidden or 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: 200px; | |
height: 200px; | |
background: #00a1de; | |
border-radius: 50% | |
} |
This file contains hidden or 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
.cone { | |
border-left: 140px solid transparent; | |
border-right: 140px solid transparent; | |
border-top: 200px solid #00a1de; | |
border-radius: 50%; | |
height: 0; | |
width: 0; | |
} |
This file contains hidden or 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
.egg { | |
display: block; | |
width: 252px; | |
height: 360px; | |
background-color: #00a1de; | |
border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; | |
} |
This file contains hidden or 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
.heart { | |
position: relative; | |
width: 200px; | |
height: 180px; | |
} | |
.heart:before, | |
.heart:after { | |
position: absolute; | |
content: ""; | |
left: 100px; | |
top: 0; | |
width: 100px; | |
height: 160px; | |
background: #00a1de; | |
border-radius: 100px 100px 0 0; | |
transform: rotate(-45deg); | |
transform-origin: 0 100%; | |
} | |
.heart:after { | |
left: 0; | |
transform: rotate(45deg); | |
transform-origin: 100% 100%; | |
} |
This file contains hidden or 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
.oval { | |
width: 300px; | |
height: 150px; | |
background: #00a1de; | |
border-radius: 150px / 75px; | |
} |
This file contains hidden or 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
.pacman { | |
width: 0px; | |
height: 0px; | |
border-right: 120px solid transparent; | |
border-top: 120px solid #00a1de; | |
border-left: 120px solid #00a1de; | |
border-bottom: 120px solid #00a1de; | |
border-top-left-radius: 120px; | |
border-top-right-radius: 120px; | |
border-bottom-left-radius: 120px; | |
border-bottom-right-radius: 120px; | |
} |
This file contains hidden or 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
.rectangle { | |
width: 300px; | |
height: 150px; | |
background: #00a1de; | |
} |
This file contains hidden or 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
.six-points-star { | |
width: 0; | |
height: 0; | |
border-left: 100px solid transparent; | |
border-right: 100px solid transparent; | |
border-bottom: 200px solid #00a1de; | |
position: relative; | |
} | |
.six-points-star:after { | |
width: 0; | |
height: 0; | |
border-left: 100px solid transparent; | |
border-right: 100px solid transparent; | |
border-top: 200px solid #00a1de; | |
position: absolute; | |
content: ""; | |
top: 60px; | |
left: -100px; | |
} |
This file contains hidden or 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: 200px; | |
height: 200px; | |
background: #00a1de; | |
} |
This file contains hidden or 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
.trapezoid { | |
border-bottom: 150px solid #00a1de; | |
border-left: 50px solid transparent; | |
border-right: 50px solid transparent; | |
height: 0; | |
width: 200px; | |
} |
This file contains hidden or 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-up { | |
width: 0; | |
height: 0; | |
border-left: 100px solid transparent; | |
border-right: 100px solid transparent; | |
border-bottom: 200px solid #00a1de; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment