一只萌萌小番薯
原先看到过类似的效果,你看看这个是你想要的吗?codepen demoUpdate:body,html,div { background: #292a38; margin: 0; padding: 0; width: 100%; height: 100%; text-align: center;}svg { width: 200px; height: 150px; cursor: pointer; -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); -o-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);}path { fill: none; -webkit-transition: stroke-dashoffset 0.5s cubic-bezier(0.25, -0.25, 0.75, 1.25), stroke-dasharray 0.5s cubic-bezier(0.25, -0.25, 0.75, 1.25); -moz-transition: stroke-dashoffset 0.5s cubic-bezier(0.25, -0.25, 0.75, 1.25), stroke-dasharray 0.5s cubic-bezier(0.25, -0.25, 0.75, 1.25); -o-transition: stroke-dashoffset 0.5s cubic-bezier(0.25, -0.25, 0.75, 1.25), stroke-dasharray 0.5s cubic-bezier(0.25, -0.25, 0.75, 1.25); -ms-transition: stroke-dashoffset 0.5s cubic-bezier(0.25, -0.25, 0.75, 1.25), stroke-dasharray 0.5s cubic-bezier(0.25, -0.25, 0.75, 1.25); transition: stroke-dashoffset 0.5s cubic-bezier(0.25, -0.25, 0.75, 1.25), stroke-dasharray 0.5s cubic-bezier(0.25, -0.25, 0.75, 1.25); stroke-width: 40px; stroke-linecap: round; stroke: #a06ba5; stroke-dashoffset: 0px;}path#top,path#bottom { stroke-dasharray: 240px 950px;}path#middle { stroke-dasharray: 240px 240px;}.cross path#top,.cross path#bottom { stroke-dashoffset: -650px; stroke-dashoffset: -650px;}.cross path#middle { stroke-dashoffset: -115px; stroke-dasharray: 1px 220px;}codePen可以查看编译后的CSS和JS: