svg+anime实现线路线条连线动画效果代码

代码语言:html

所属分类:动画

代码描述:svg+anime实现线路线条连线动画效果代码

代码标签: svg anime 线路 线条 连线 动画

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

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
<style>
    body {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.anim, .anim svg {
  position: relative;
  width: 100%;
  height: 100%;
}
.anim path {
  stroke-width: 6;
}

html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body,
header {
	background-color: #111116; /* Black */
}

body {
  position: absolute;
  width: 100%;
  height: 100%;
  color: white;
  font-family: sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.color-01 { color: #FF1461; } /* Red */
.color-02 { color: #FF7C72; } /* Orange */
.color-03 { color: #FBF38C; } /* Yellow */
.color-04 { color: #A6FF8F; } /* Citrus */
.color-05 { color: #18FF92; } /* Green */
.color-06 { color: #1CE2B2; } /* Darkgreen */
.color-07 { color: #5EF3FB; } /* Turquoise */
.color-08 { color: #61C3FF; } /* Lightblue */
.color-09 { color: #5A87FF; } /* Blue */
.color-10 { color: #8453E3; } /* Purple */
.color-11 { color: #C26EFF; } /* Lavender */
.color-12 { color: #FB89FB; } /* Pink */
</style>

</head>

<body>
    <!-- partial:index.partial.html -->
    <div class="anim">

        <svg width="187px" height="367px" viewBox="0 0 187 367" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
    <desc>Created with Sketch.</desc>
    <defs>
        <filter x="-8.7%" y="-3.5%" width="117.4%" height="108.1%" filterUnits="objectBoundingBox" id="filter-1">
            <feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="3.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 0.0688   0 0 0 0 0.0688   0 0 0 0 0.16  0 0 0 0.231317935 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
            <feMerge>
                <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
                <feMergeNode in="SourceGraphic"></feMergeNode>
            </feMerge>
        </filter>
    </defs>
    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="Artboard-2-Copy" transform="translate(-1184.000000, -251.000000)">
            <g id="Group-9-Copy-2-+-Group-9-Copy-4-+-Group-9-Copy-3-+-Group-9-Copy-5-Mask" transform="translate(1135.000000, 186.000000)">
                <g id="Group-9-Copy-5" filter="url(#filter-1)" transform="translate(142.500000, 252.500000) scale(-1, 1) translate(-142.500000, -252.500000) translate(59.000000, 73.000000)">
                    <path d="M111,358.691406 L111,125.097656 L111,193.6875 L146.457737,193.6875 L146.457737,193.6875 C153.637439,193.6875 159.457737,187.867202 159.457737,180.6875 L159.457737,83" id="Path-58" stroke="#A6A6FF" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"></path>
                    <path d="M38,292.841187 L38,179.980469 L38,179.980469 C38,172.248482 44.2680135,165.980469 52,165.980469 L73.4577369,165.980469 L73.4577369,165.980469 C80.6374386,165.980469 86.4577369,160.16017 86.4577369,152.980469 L86.4577369,18.4726562" id="Path-58-Copy" stroke="#5757FF" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" transform="translate(62.228868, 155.656921) scale(-1, 1) translate(-62.228868, -155.656921) "></path>
                    <path d="M8,358.195313 L8,249.566406 L8,249.566406 C8,241.83442 14.2680135,235.566406 22,235.566406 L73.4577369,235.566406 L73.4577369,235.566406 C80.6374386,235.566406 86.4577369,229.746108 86.4577369,222.566406 L86.4577369,175" id="Path-58-Copy-2" stroke="#A6A6FF" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" transform="translate(47.228868, 266.597656) scale(-1, 1) translate(-47.228868, -266.597656) "></path>
                    <g id="Group-4" transform="translate(109.000000, 242.000000)">
                        <rect id="Rectangle-40" fill="#D06361" x="0" y="0" width="4" height="11" rx="2"></rect>
                        <rect id="Rectangle-40-Copy" fill="#993F42" x="0" y="0" width="4" height="4" rx="2"></rect>
                    </g>
                    <g id="Group-4-Copy" transform="translate(109.000000, 200.000000)">
                        <rect id="Rectangle-40" fill="#2B2BFF" x="0" y="0" width="4" height="11" rx="2"></rect>
                        <rect id="Rectangle-40-Copy&q.........完整代码请登录后点击上方下载按钮下载查看

网友评论0