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 | <! DOCTYPE html> < html lang = "en" > < head > < meta charset = "UTF-8" > < title ></ title > < style > .apple { position: relative; width: 172px; height: 202px; margin: 150px auto; outline: 1px solid green; outline-offset: 30px; } .handle { position: absolute; z-index: 100; left: 122px; top: -22px; transform: rotate(40deg); background-color: #62bb47; } .handle:before, .handle:after { background-color: #62bb47; border-radius: 50%; content: "#"; display: block; height: 90px; position: absolute; text-indent: -9999px; width: 90px; } .handle:before { clip: rect(0 13px 80px 0px); } .handle:after { clip: rect(14px 100px 76px 76px); left: -64px; } .apple .top, .apple .bottom { position: absolute; background-color: #e03a3e; } .top-wrap, .bottom-wrap { position: absolute; width: 100%; overflow: hidden; } .top-wrap { top: 47px; height: 128px; } .top { top: 0; border-radius: 108px/128px; width: 108px; height: 100%; } .top.left { left: 0; } .top.right { right: 0; } .bottom-wrap { top: 98px; height: 104px; } .bottom { border-radius: 22px 22px 64px 64px/106px 106px 106px 106px; height: 106px; top: 0; width: 64px; } .bottom.left { transform: rotate(-25deg); left: 12px; } .bottom.right { transform: rotate(25deg); right: 12px; } .middle, .bottom-radius, .top-radius { position: absolute; background-color: #e03a3e; left: 50%; transform: translateX(-50%); } .middle { height: 145px; top: 55px; width: 70px; } .bottom-radius { position: absolute; border-radius: 50%; height: 22px; top: 192px; width: 48px; background-color: #fff; } .top-radius { top: -26px; border-radius: 20px; height: 80px; transform: translateX(-50%) rotate(-45deg) scale(0.9); width: 80px; background-color: #fff; } </ style > </ head > < body > <!-- http://www.ecsspert.com/css3-logos/apple.php --> < div class = "apple" > < div class = "handle" ></ div > < div class = "top-wrap" > < div class = "top left" ></ div > < div class = "top right" ></ div > </ div > < div class = "bottom-wrap" > < div class = "bottom left" ></ div > < div class = "bottom right" ></ div > </ div > < div class = "middle" ></ div > < div class = "bottom-radius" ></ div > < div class = "top-radius" ></ div > </ div > </ body > </ 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 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 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | <! DOCTYPE html> < html > < head > < meta charset = "utf-8" /> < title >CSS3繪制的蘋果 Logo - by 前端開發(fā)網(wǎng)(W3Cfuns)</ title > < style > #apple .canvas,.apple6,.apple7,.apple8,.apple61 { background: #f2f2f2; } #apple .icon { left:184px; height: 202px; top:51px; width: 172px; } .apple1 { border-radius:108px 108px 108px 94px/128px 128px 128px 128px; height:128px; top:47px; width:108px; } .apple2 { left:72px; } .apple3 { border-radius:22px 64px 64px 64px/106px 106px 106px 106px; height: 106px; left:12px; -o-transform:rotate(-25deg); -moz-transform:rotate(-25deg); -ms-transform:rotate(-25deg); -webkit-transform:rotate(-25deg); transform:rotate(-25deg); top:98px; width: 64px; } .apple4 { border-radius:64px 22px 64px 64px/106px 106px 106px 106px; left:103px; -o-transform:rotate(25deg); -moz-transform:rotate(25deg); -ms-transform:rotate(25deg); -webkit-transform:rotate(25deg); transform:rotate(25deg); } .apple5 { height: 145px; left:54px; top:53px; width:70px; } .apple6 { left:50px; -o-transform:scaley(0.5); -moz-transform:scaley(0.5); -ms-transform:scaley(0.5); -webkit-transform:scaley(0.5); transform:scaley(0.5); top:14px; } .apple61 { border-radius:20px; height: 80px; -o-transform: rotate(-45deg) scale(0.9); -moz-transform: rotate(-45deg) scale(0.9); -ms-transform: rotate(-45deg) scale(0.9); -webkit-transform: rotate(-45deg) scale(0.9); transform: rotate(-45deg) scale(0.9); width: 80px; } .apple7 { border-radius:50%; height: 22px; left:66px; top:192px; width: 47px; } .apple8 { border-radius:50%; height: 85px; left:144px; top:63px; width: 85px; } #apple .slice { height: 200px; position: absolute; width:180px; } #apple .slice * { position: absolute; } #apple .slice1 *,.apple9:before,.apple9:after { background: #62bb47; } #apple .slice2 * { background: #fcb827; } #apple .slice3 * { background: #f6821f; } #apple .slice4 * { background: #e03a3e; } #apple .slice5 * { background: #963d97; } #apple .slice6 * { background: #009ddc; } #apple .slice1 { clip:rect(0 180px 73px 0px); } #apple .slice2 { clip:rect(73px 180px 98px 0px); } #apple .slice3 { clip:rect(98px 180px 123px 0px); } #apple .slice4 { clip:rect(123px 180px 148px 0px); } #apple .slice5 { clip:rect(148px 180px 174px 0px); } #apple .slice6 { clip:rect(174px 180px 205px 0px); } .apple9 { left:122px; top:-18px; -o-transform: rotate(40deg); -moz-transform: rotate(40deg); -ms-transform: rotate(40deg); -webkit-transform: rotate(40deg); transform: rotate(40deg); } .apple9:before,.apple9:after { border-radius:50%; content:"#"; display: block; height: 90px; position: absolute; text-indent: -9999px; width:90px; } .apple9:before { clip:rect(0 13px 80px 0px); } .apple9:after { clip:rect(14px 100px 76px 76px); left:-64px; } #apple .header h2 { text-indent:200px; } /* general styles */ .canvas { display: block; overflow: hidden; position: relative; top: 0px; text-indent:-9999px; z-index: 10; } .icon, .icon * { display: block; position: absolute; } .monitor, .monitor .canvas { height: 304px; width:540px; } .monitor { background: #000; border:30px solid #000; border-radius:20px; float:left; position:relative; } .monitor:before { /* shadow */ box-shadow: 0 360px 10px rgba(0,0,0,0.2); border-radius:50%; content: "#"; display: block; height: 20px; left: 30px; position: absolute; text-indent: -9999px; width: 540px; } .monitor:after { /* shine */ background: -webkit-linear-gradient(top left, rgba(255,255,255,0) 60%, rgba(255,255,255,0.2) 60%, rgba(255,255,255,0) 100%); border-radius:20px 20px 0 0; height: 364px; content: "#"; display: block; position: absolute; right: -30px; text-indent: -9999px; top:-30px; width:600px; z-index: 10; } </ style > </ head > < body > < div id = "apple" > < div class = "monitor" > < div class = "canvas" > < div class = "icon" > < div class = "slice1 slice" > < div class = "apple1" ></ div > < div class = "apple2 apple1" ></ div > < div class = "apple3" ></ div > < div class = "apple4 apple3" ></ div > < div class = "apple5" ></ div > </ div > < div class = "slice2 slice" > < div class = "apple1" ></ div > < div class = "apple2 apple1" ></ div > < div class = "apple3" ></ div > < div class = "apple4 apple3" ></ div > < div class = "apple5" ></ div > </ div > < div class = "slice3 slice" > < div class = "apple1" ></ div > < div class = "apple2 apple1" ></ div > < div class = "apple3" ></ div > < div class = "apple4 apple3" ></ div > < div class = "apple5" ></ div > </ div > < div class = "slice4 slice" > < div class = "apple1" ></ div > < div class = "apple2 apple1" ></ div > < div class = "apple3" ></ div > < div class = "apple4 apple3" ></ div > < div class = "apple5" ></ div > </ div > < div class = "slice5 slice" > < div class = "apple1" ></ div > < div class = "apple2 apple1" ></ div > < div class = "apple3" ></ div > < div class = "apple4 apple3" ></ div > < div class = "apple5" ></ div > </ div > < div class = "slice6 slice" > < div class = "apple1" ></ div > < div class = "apple2 apple1" ></ div > < div class = "apple3" ></ div > < div class = "apple4 apple3" ></ div > < div class = "apple5" ></ div > </ div > < div class = "slice" > < div class = "apple6" >< div class = "apple61" ></ div ></ div > < div class = "apple7" ></ div > < div class = "apple8" > </ div > < div class = "apple9" ></ div > </ div > </ div > </ div > </ div > </ div > </ body > </ html > |
聯(lián)系客服