This last part of CSS Shapes will tell you about Different CSS Shapes including Speech Bubble, Heart, Biohazard, Yin Yang, Infinity, Magnifying Glass and TV Shapes.
You can visit other parts of tutorial here:
- CSS Shapes – Circle
- CSS Shapes – Triangle
- CSS Shapes – Square Rectangle Parallelogram Trapezoid and Polygons
- CSS Shapes – Diamond and Star
- CSS Shapes – Chart and Ribbon
- Different CSS Shapes
Different CSS Shapes
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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | #speechBubble { width: 150px; height: 100px; background: #103252; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; } #speechBubble:before { content: ""; position: absolute; width: 0; height: 0; border-top: 13px solid transparent; border-right: 26px solid #103252; border-bottom: 13px solid transparent; margin: 13px -25px; } #heart { position: relative; } #heart:before, #heart:after { position: absolute; content: ""; left: 84px; top: 0; width: 84px; height: 140px; background: #103252; /*border-radius*/ -webkit-border-radius: 60px 60px 0 0; -moz-border-radius: 60px 60px 0 0; border-radius: 60px 60px 0 0; /*transform*/ -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); /*transform-origin*/ -webkit-transform-origin: 0 100%; -moz-transform-origin: 0 100%; -ms-transform-origin: 0 100%; -o-transform-origin: 0 100%; transform-origin: 0 100%; } #heart:after { left: 0; /*transform*/ -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); /*transform-origin*/ -webkit-transform-origin: 100% 100%; -moz-transform-origin: 100% 100%; -ms-transform-origin: 100% 100%; -o-transform-origin: 100% 100%; transform-origin: 100% 100%; } #biohazard { width: 0; height: 0; border-bottom: 80px solid black; border-top: 80px solid black; border-left: 80px solid #103252; border-right: 80px solid #103252; -moz-border-radius: 80px; -webkit-border-radius: 80px; border-radius: 80px; } #yin-yang { width: 144px; height: 72px; background: #000; border-color: #103252; border-style: solid; border-width: 3px 3px 75px 3px; border-radius: 100%; position: relative; } #yin-yang:before { content: ""; position: absolute; top: 50%; left: 0; background: #000; border: 27px solid #103252; border-radius: 100%; width: 18px; height: 18px; } #yin-yang:after { content: ""; position: absolute; top: 50%; left: 50%; background: #103252; border: 27px solid #000; border-radius:100%; width: 18px; height: 18px; } #infinity { position: relative; width: 212px; height: 100px; } #infinity:before, #infinity:after { content: ""; position: absolute; top: 0; left: 0; width: 60px; height: 60px; border: 20px solid #103252; -moz-border-radius: 50px 50px 0 50px; border-radius: 50px 50px 0 50px; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); } #infinity:after { left: auto; right: 0; -moz-border-radius: 50px 50px 50px 0; border-radius: 50px 50px 50px 0; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); } #magnifying-glass { font-size: 10em; /* Change to controls the size of magnifying glass. */ display: inline-block; width: 0.4em; height: 0.4em; border: 0.1em solid #103252; position: relative; border-radius: 0.35em; } #magnifying-glass::before { content: ""; display: inline-block; position: absolute; right: -0.25em; bottom: -0.1em; border-width: 0; background: #103252; width: 0.35em; height: 0.08em; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); } #tv { position: relative; width: 200px; height: 150px; margin: 20px; background: #103252; border-radius: 50% / 10%; color: white; text-align: center; text-indent: .1em; } #tv:before { content: ''; position: absolute; top: 10%; bottom: 10%; right: -5%; left: -5%; background: inherit; border-radius: 5% / 50%; } |
With end of this series of creating Different CSS Shapes we have been familiar with power of CSS to draw shapes without any need of images. If you have created more shapes using CSS then let me know. I hope you have enjoyed these CSS Shapes tutorial series much.