MotionPathPlugin实现范艾伦皮带和极光效果代码
代码语言:html
所属分类:动画
代码描述:MotionPathPlugin实现范艾伦皮带和极光效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Nunito:wght@600&display=swap"); body { margin: 0; padding: 0; justify-content: center; align-items: center; display: flex; height: 100vh; overflow: hidden; background: #000016; font-family: "Nunito", sans-serif; font-weight: 600; font-size: 11px; } svg { width: 100vw; height: 100vh; } </style> </head> <body> <svg id="svg" viewBox="0 0 1280 800"> <defs> <radialGradient id="grad1" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop offset="0%" style="stop-color: #ec4646; stop-opacity: 1"></stop> <stop offset="100%" style="stop-color: #ffe227; stop-opacity: 0"></stop> </radialGradient> <radialGradient id="grad2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop offset="0%" style="stop-color: #ffe227; stop-opacity: 1"></stop> <stop offset="100%" style="stop-color: #f88f01; stop-opacity: 0"></stop> </radialGradient> <radialGradient id="grad3" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop offset="0%" style="stop-color: #f88f01; stop-opacity: 1"></stop> <stop offset="100%" style="stop-color: #e27802; stop-opacity: 0"></stop> </radialGradient> <radialGradient id="grad4" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop offset="0%" style="stop-color: #111f46; stop-opacity: 1" id="aurora-stop-1"></stop> <stop offset="100%" style="stop-color: #111f46; stop-opacity: 0.2" id="aurora-stop-2"></stop> </radialGradient> <radialGradient id="grad5" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop offset="0%" style="stop-color: #d3e0ea; stop-opacity: 1" id="cxx"></stop> <stop offset="100%" style="stop-color: #d3e0ea; stop-opacity: 0" id="cxx2"></stop> </radialGradient> </defs> <rect x="0" y="0" width="1280" height="800" fill="#111f46"></rect> <g> <rect width="1280" height="300" fill="#05102c" stroke="none" id="sky"></rect> <circle cx="133.98568875202156" cy="198.75639805406715" fill="url(#grad5)" stroke="none" r="1.5284343532879316"></circle> <circle cx="282.167361210396" cy="45.49542600062168" fill="url(#grad5)" stroke="none" r="0.6199522682163205"></circle> <circle cx="851.4766015763282" cy="197.81048627657188" fill="url(#grad5)" stroke="none" r="0.057492235454552176"></circle> <circle cx="793.1550711306073" cy="189.404140212519" fill="url(#grad5)" stroke="none" r="0.3988069039353612"></circle> <circle cx="184.5274824812645" cy="233.23377934807155" fill="url(#grad5)" stroke="none" r="0.570350074398313"></circle> <circle cx="548.1661268067946" cy="175.89927505505315" fill="url(#grad5)" stroke="none" r="1.3250861454531264"></circle> <circle cx="1259.2291666581239" cy="67.26179157119549" fill="url(#grad5)" stroke="none" r="1.8426499753561418"></circle> <circle cx="826.2793278521239" cy="15.235512004047973" fill="url(#grad5)" stroke="none" r="0.7055386184056911"></circle> <circle cx="1187.1814362026525" cy="78.15687160888577" fill="url(#grad5)" stroke="none" r="0.5815911487767669"></circle> <circle cx="414.5441965829261" cy="35.718541810278424" fill="url(#grad5)" stroke="none" r="1.98496467592118"></circle> <circle cx="780.1187333413516" cy="31.564670985934107" fill="url(#grad5)" stroke="none" r="0.5250563577933594"></circle> <circle cx="257.48520194243076" cy="257.09034637588513" fill="url(#grad5)" stroke="none" r="1.5951181755099835"></circle> <circle cx="1006.7654959553328" cy="112.58850116792712" fill="url(#grad5)" stroke="none" r="0.6127005267439467"></circle> <circle cx="361.41866069519904" cy="66.75990229227794" fill="url(#grad5)" stroke="none" r="0.4562767232012743"></circle> <circle cx="396.4884819052395" cy="109.57319098188555" fill="url(#grad5)" stroke="none" r="1.1972419055724484"></circle> <circle cx="790.9931555615236" cy="146.4578451276225" fill="url(#grad5)" stroke="none" r="0.026001016553714562"></circle> <circle cx="1098.675711501904" cy="17.048791823124517" fill="url(#grad5)" stroke="none" r="0.24690554617730975"></circle> <circle cx="880.4215264421908" cy="154.4379755282752" fill="url(#grad5)" stroke="none" r="1.1299673500819667"></circle> <circle cx="573.0906038225114" cy="137.69808250484363" fill="url(#grad5)" stroke=.........完整代码请登录后点击上方下载按钮下载查看
网友评论0