Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### 2D ZOMBIE CSS DESIGN (THANKS CAPTAIN ANONYMOUS)
- <div class="container">
- <div class="hair">
- <div></div>
- <div></div>
- <div></div>
- <div></div>
- <div></div>
- </div>
- <div class="head">
- <div class="scar"></div>
- <div class="eye"></div>
- <div class="mouth"></div>
- <div class="bolt"></div>
- </div>
- </div>
- #### CSS
- .container,
- .head,
- .eye,
- .mouth,
- .hair,
- .scar,
- .bolt {
- position: absolute;
- }
- body {
- background: #DDFFF7;
- }
- .container {
- margin: auto;
- top: 0;
- bottom: 0;
- right: 0;
- left: 0;
- width: 200px;
- height: 200px;
- }
- .hair {
- z-index: 50;
- div {
- position: absolute;
- top: 30px;
- left: 10px;
- border-top: 30px solid #3B3F4B;
- border-left: 15px solid transparent;
- border-right: 15px solid transparent;
- }
- div:nth-child(2) {
- left: 30px;
- }
- div:nth-child(3) {
- left: 50px;
- }
- div:nth-child(4) {
- left: 70px;
- }
- }
- .head {
- width: 200px;
- height: 200px;
- background: #96C691;
- border-radius: 20px 20px 100% 100%;
- box-shadow: inset 0 40px 0 0 #3B3F4B;
- }
- .scar {
- top: 50px;
- left: 120px;
- width: 70px;
- height: 8px;
- background: #3B3F4B;
- border-radius: 100px;
- &:before,
- &:after {
- position: absolute;
- content: '';
- }
- &:before {
- top: -5px;
- left: 20px;
- width: 5px;
- height: 20px;
- background: #3B3F4B;
- border-radius: 100px;
- }
- &:after {
- top: -5px;
- left: 50px;
- width: 5px;
- height: 20px;
- background: #3B3F4B;
- border-radius: 100px;
- }
- }
- .eye {
- top: 80px;
- left: 40px;
- width: 30px;
- height: 30px;
- background: #FFF;
- border-radius: 100%;
- border: 4px solid #3B3F4B;
- &:before {
- position: absolute;
- content: '';
- top: -4px;
- left: 83px;
- width: 30px;
- height: 30px;
- background: #FFF;
- border-radius: 100%;
- border: 4px solid #3B3F4B;
- }
- }
- .mouth {
- top: 130px;
- left: 65px;
- width: 80px;
- height: 20px;
- border-radius: 100px;
- background: #3B3F4B;
- }
- .bolt {
- z-index: -1;
- top: 140px;
- left: 0;
- width: 30px;
- height: 10px;
- background: #A2A5A4;
- border: 5px solid #DDFFF7;
- border-left: none;
- box-shadow: -8px 0 0 #BDBEBE;
- &:before {
- position: absolute;
- content: '';
- top: -3px;
- left: 162px;
- width: 30px;
- height: 10px;
- background: #A2A5A4;
- border: 5px solid #DDFFF7;
- border-right: none;
- box-shadow: 8px 0 0 #BDBEBE;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement