流动边框效果图:
代码块:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box{
position: relative;
width:200px;
height:200px;
background: #b4affd;
overflow: hidden;
}
.box>span{
position: absolute;
}
.box>span:nth-child(4n+1){/*上*/
left:0;
top:0;
height: 0px;
width:400px;
border-top:5px dashed black;
animation: toRight 8s linear infinite;
transform: translateX(-200p