Hamburger HTML:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | <div class="hamburger"> <div class="top_bun"> <div class="seeds"> <area /><area /> <area /><area /> <area /><area /> <area /><area /> <area /><area /> <area /><area /> <area /><area /> <area /><area /> <area /><area /> <area /><area /> <area /><area /> <area /><area /> </div> <div class="dressing"></div> </div> <div class="middle"> <div class="catsup"></div> <div class="spacer"></div> <div class="mustard"></div> </div> <div class="bottom_bun"> <div class="lettuce"></div> <div class="dressing"></div> </div> </div> |
Hamburger CSS:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
selector .hamburger { max-width: 300px; margin: 0 auto; } selector .top_bun { background-color: #feaa4d; border-radius: 50px; height: 60px; margin-bottom: 15px; overflow: hidden; position: relative; transition: all 300ms ease-in-out; } selector .hamburger:hover .top_bun, selector .hamburger:hover .middle { margin-bottom: 0; } selector .top_bun .seeds { height: 40px; overflow: hidden; } selector .top_bun .seeds area:nth-child(odd), selector .top_bun .seeds area:nth-child(odd) { background-color: #ffedac; border-radius: 10px 0; display: inline-block; height: 10px; margin: 0 7px; width: 10px; } selector .top_bun .seeds area:nth-child(even), selector .top_bun .seeds area:nth-child(even) { background-color: #ffedac; border-radius: 0 10px; display: inline-block; height: 10px; margin: 0 6px -5px; width: 10px; } selector .top_bun .dressing { background-color: #fac180; border-bottom-left-radius: 25px; border-bottom-right-radius: 25px; height: 20px; } selector .middle { background-color: #8f5226; border-radius: 50px; box-shadow: 0px 0px 250px 50px white; height: 60px; margin-bottom: 15px; transition: all 300ms ease-in-out; } selector .middle .catsup { background-color: #c1222d; border-top-left-radius: 20px; border-top-right-radius: 20px; height: 15px; margin: 0 auto; width: 98%; } selector .middle .spacer { height: 30px; } selector .middle .mustard { background-color: #fdde0e; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; height: 15px; margin: 0 auto; width: 98%; } selector .bottom_bun { background-color: #f1b053; border-radius: 50px; height: 60px; } selector .bottom_bun .lettuce { background-color: #91d04a; border-top-left-radius: 25px; border-top-right-radius: 25px; height: 20px; } selector .bottom_bun .dressing { background-color: #fac180; height: 10px; } @media(max-width: 767px){ .hamburger { transform: scale(.8); } } |