Python
- 4 ответа
- 0 вопросов
2
Вклад в тег
window.onload=function(){
let paths = document.querySelectorAll('[id=p]');
paths.forEach(function(path) {
const length = path.getTotalLength();
path.style.strokeDasharray = length;
path.style.strokeDashoffset = length;
});
}
#p {
animation: strokeOffset 5s linear forwards;
animation-iteration-count: infinite;
}
@keyframes strokeOffset {
50% {
stroke-dashoffset: 0;
}
100% {
stroke-dashoffset: 1;
}
}