svg矢量奖杯动画效果
代码语言:html
所属分类:动画
代码描述:svg矢量奖杯动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { padding: 0; margin: 0; } .trophy-container { position: relative; width: 100%; height: 99vh; margin: auto; } @media only screen and (max-width: 480px) { #wizzy { display: none; } } </style> </head> <body translate="no"> <div class="trophy-container"> <svg id="svgTrophyAnimation" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="true" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 550 400"> <defs> <g id="Layer25_0_FILL"> <path id="vectorShadow" fill="#000000" stroke="none" d=" M 203.6 348.1 Q 203.6 351 223.65 353.05 243.7 355.1 272.1 355.1 300.5 355.1 320.55 353.05 340.6 351 340.6 348.1 340.6 345.2 320.55 343.15 300.5 341.1 272.1 341.1 243.7 341.1 223.65 343.15 203.6 345.2 203.6 348.1 Z" /> </g> <g id="Layer24_0_FILL"> <path id="vector-tip-left" fill="#F7CF40" stroke="none" d=" M 271.6 17.7 L 223.4 135.4 272.85 137.1 271.6 17.7 Z" /> </g> <g id="Layer23_0_FILL"> <path fill="#FEC400" stroke="none" d=" M 272.85 137.1 L 318.9 137.1 271.6 17.7 272.85 137.1 Z" /> </g> <g id="Layer22_0_FILL"> <path fill="#f7cf40" stroke="none" d=" M 246.65 181.45 L 272.45 181.45 272.85 137.1 223.4 135.4 246.65 181.45 Z" /> </g> <g id="Layer21_0_FILL"> <path fill="#F6B000" stroke="none" d=" M 318.9 137.1 L 272.85 137.1 272.45 181.45 294 181.25 318.9 137.1 Z" /> </g> <g id="Layer17_0_FILL"> <path fill="#8F2418" stroke="none" d=" M 278.5 136.3 Q 278.5 133.45 276.45 131.35 274.45 129.35 271.55 129.35 268.7 129.35 266.65 131.35 264.6 133.45 264.6 136.3 264.6 139.15 266.65 141.2 268.7 143.25 271.55 143.25 274.45 143.25 276.45 141.2 278.5 139.15 278.5 136.3 Z" /> </g> <g id="Layer14_0_FILL"> <path fill="#FEE447" stroke="none" d=" M 284.45 180.7 L 241.85 180.7 241.85 203.75 284.45 203.75 284.45 180.7 Z" /> </g> <g id="Layer13_0_FILL"> <path fill="#FEC400" stroke="none" d=" M 299.8 180.7 L 284.45 180.7 284.45 203.75 299.8 203.75 299.8 180.7 Z" /> </g> <g id="Layer10_0_FILL"> <path fill="#f6b100" stroke="none" d=" M 307 245.55 L 307 204.85 237.35 204.85 237.35 245.55 307 245.55 Z" /> </g> <g id="Layer9_0_FILL"> <path fill="#FEE447" stroke="none" d=" M 307 247.05 L 307 202.9 237.35 202.9 237.35 247.05 307 247.05 Z" /> </g> <g id="Layer8_0_FILL"> <path fill="#C39359" stroke="none" d=" M 273.95 236.7 L 282.35 216.55 277.8 216.55 272.4 229.85 267 216.55 262.5 216.55 270.5 236.7 273.95 236.7 Z" /> </g> <path id="red-ball" fill="#EB3B3A" stroke="none" d=" M 209.1 145.5 Q 211 147.35 213.7 147.35 216.3 147.35 218.2 145.5 220.05 143.65 220.05 140.95 220.05 138.3 218.2 136.45 216.3 134.55 213.7 134.55 211 134.55 209.1 136.45 207.3 138.3 207.3 140.95 207.3 143.65 209.1 145.5 Z" /> <path id="blue-ball" fill="#6633CC" stroke="none" d=" M 247.9 222.6 Q 246.15 222.6 244.9 223.8 243.65 225.05 243.65 226.8 243.65 228.55 244.9 229.8 246.15 231 247.9 231 249.65 231 250.85 229.8 252.1 228.55 252.1 226.8 252.1 225.05 250.85 223.8 249.65 222.6 247.9 222.6 Z" /> <g id="Layer3_0_FILL"> <path id="yellow-ball" fill="#FED13C" stroke="none" d=" M 173.25 197.65 Q 173.25 195.55 171.75 194.05 170.25 192.55 168.15 192.55 166 192.55 164.5 194.05 163 195.55 163 197.65 163 199.8 164.5 201.3 166 202.8 168.15 202.8 170.25 202.8 171.75 201.3 173.25 199.8 173.25 197.65 Z" /> </g> <path id="Layer20_0_1_STROKES" stroke="#8F2418" stroke-width="5" stroke-linejoin="round" stroke-linecap="round" fill="none" d=" M 223.4 135.4 L 246.65 181.45 294 181.25 318.9 137.1 271.6 17.7 223.4 135.4 Z" /> <path id="Layer18_0_1_STROKES" stroke="#FEFEFE" stroke-width="5" stroke-linejoin="round" stroke-linecap="round" fill="none" d=" M 271.6 29.45 L 247.6 127.75" /> <path id="Layer17_0_1_STROKES" stroke="#8F2418" stroke-width="5" stroke-linejoin="round" stroke-linecap="round" fill="none" d=" M 278.5 136.3 Q 278.5 139.15 276.45 141.2 274.45 143.25 271.55 143.25 268.7 143.25 266.65 141.2 264.6 139.15 264.6 136.3 264.6 133.45 266.65 131.35 268.7 129.35 271.55 129.35 274.45 129.35 276.45 131.35 278.5 133.45 278.5 136.3 Z" /> <path id="Layer16_0_1_STROKES" stroke="#8F2418" stroke-width="5" stroke-linejoin="round" stroke-linecap="round" fill="none" d=" M 271.6 135.1 L 271.6 17.7" /> <path id="Layer12_0_1_STROKES" stroke="#8F2418" stroke-width="5" stroke-linejoin="round" stroke-linecap="round" fill="none" d=" M 241.85 180.7 L 299.8 180.7 299.8 203.75 241.85 203.75 241.85 180.7 Z" /> <path id="Layer10_0_1_STROKES" stroke="#8F2418" stroke-width="5" stroke-linejoin="round" stroke-linecap="round" fill="none" d=" M 237.35 204.85 L 307 204.85 307 245.55 237.35 245.55 237.35 204.85 Z" /> <path id="Layer9_0_1_STROKES" stroke="#8F2418" stroke-width="5" stroke-linejoin="round" stroke-linecap="round" fill="none" d=" M 237.35 202.9 L 307 202.9 307 247.05 237.35 247.05 237.35 202.9 Z" /> <path id="wizzy" stroke="#fec400" stroke-width="3.5" stroke-linejoin="round" stroke-linecap="round" fill="none" d=" M 282.85 129.6 Q 333.808203125 153.475390625 339.675 160.2 345.5419921875 166.9302734375 344.525 172.95 343.5044921875 178.9619140625 326.05 185.35 323.81640625 185.8197265625 321.55 186.275 303.973046875 189.7763671875 284.45 192.2 270.001171875 194.1857421875 246.475 189.15 222.948046875 184.111328125 211.3 178.65 197.1 172.05 205.7 161.95 234.2 131.3 288.95 121.2 318.25 115.95 339.8 101.65 342.7 99.75 339.95 96.6 327.9 82.9998046875 295.95 73.65 264 64.3005859375 235.25 71.975 206.5 79.6494140625 210.65 87.3 214.8 94.9501953125 224.7 101.25 232.25 105.95 240.35 109.8 255.15 116.95 271.2 119.75" /> </defs> <g id="shadowGroup" transform="matrix( 1, 0, 0, 1, 0,0) "> <use xlink:href="#Layer25_0_FILL" /> </g> <g id="back-red-ball"> <use xlink:href="#red-ball" /> </g> <g id="back-yellow-ball"> <use xlink:href="#yellow-ball" /> </g> <g id="back-blue-ball"> <use xlink:href="#blue-ball" /> </g> <g id="back-whizzy"> <use xlink:href="#wizzy" /> </g> <g id="vectorGroup" transform="matrix( 1, 0, 0, 1, 0,0) "> <use xlink:href="#Layer24_0_FILL" /> <use xlink:href="#Layer23_0_FILL" /> <use xlink:href="#Layer22_0_FILL" /> <use xlink:href="#Layer21_0_FILL" /> <use xlink:href="#Layer18_0_1_STROKES" /> <use xlink:href="#Layer20_0_1_STROKES" /> <use xlink:href="#Layer14_0_FILL" /> <use xlink:href="#Layer13_0_FILL" /> <use xlink:href="#Layer12_0_1_STROKES" /> <g id="vHolderBack"> <use xlink:href="#Layer10_0_FILL" /> <use xlink:href="#Layer10_0_1_STROKES" /> </g> <g id="vHolder"> <use xlink:href="#Layer9_0_FILL" /> <use xlink:href="#Layer9_0_1_STROKES" /> <use xlink:href="#Layer8_0_FILL" /> </g> <g id="vectorInkTop"> <use xlink:href="#Layer16_0_1_STROKES" /> </g> <g id="inkBall"> <use xlink:href="#Layer17_0_FILL" /> <use xlink:href="#Layer17_0_1_STROKES" /> </g> </g> <g id="front-red-ball"> <use xlink:href="#red-ball" /> </g> <g id="front-yellow-ball"> <use xlink:href="#yellow-ball" /> </g> <g id="front-blue-ball"> <use xlink:href="#blue-ball" /> </g> <g id="front-whizzy"> <use xlink:href="#wizzy" /> </g> </svg> </div> <script type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script> <script type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/TweenMax.min.js"></script> <script> (function () { "use strict"; // Vector Trophy Animation var vectorTrophy = { // Trophy Timeline Animation trophyTimeline: function () { // vector elements var vectorTipLeft = document.getElementById('Layer24_0_FILL'), vectorTipright = document.getElementById('Layer23_0_FILL'), vectorTipBottomRight = document.getElementById('Layer22_0_FILL'), vectorTipBottomLeft = document.getElementById('Layer21_0_FILL'), vectorshine = document.getElementById('Layer18_0_1_STROKES'), inkTopGroup = document.getElementById('vectorInkTop'), in.........完整代码请登录后点击上方下载按钮下载查看
网友评论0