<div></div>
div{
width: 500px;
height: 100px;
position:relative;
overflow: hidden;
border: 2px solid green;
color:red;
}
div:before {
content: url('data:image/svg+xml;utf8,<svg height="100px" width="500px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polyline fill="none" stroke="gold" stroke-width="3" points="0,45 40,45 44,31 49,44 55,46 61,52 83,8 90,90 100,44 115,44 125,40 139,45 140,45,150,45 180,65 194,31 199,44 205,46 211,52 233,8 240,90 250,44 265,44 275,10 290,45 300,45, 320,45 360,65 394,31 399,44 405,46 411,52 433,8 440,90 450,44 465,44 475,40 490,45 500,45"></polyline></svg>');
display:block;
width: 500px;
height: 100px;
background-color:black;
position: relative;
}
div:after {
content: "";
position: absolute;
left: 0;
top: 0;
width: 100%;
bottom: 0;
background: linear-gradient(
to right,
rgba(0, 0, 0, 1) 0%,
rgba(0, 0, 0, 1) 50%,
rgba(0, 0, 0, 0) 100%
);
background-repeat: repeat-x;
background-size:130% 100%;
background-position: 0 0;
animation: graph 3s linear infinite;
}
@keyframes graph {
100% {
background-position: 600px 0;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.