效果图
原理
主要应用到了SVG的两个属性分别为: stroke-dasharray和stroke-dashoffset.
stroke-dasharray
strokedasharray属性用于创建虚线:下面来看看例子
path{
stroke: #000;
fill: transparent;
stroke-width: 2px;
stroke-dasharray: 10;
}
</style>
</head>
<body>
<svg width=