

const links = document.querySelectorAll('a'); | |
links.forEach((link) => { | |
link.style.outline = '10px solid #52c5ea'; | |
link.style.outlineOffset = '5px'; | |
link.animate( | |
[ | |
{ outlineColor: '#448c4a', outlineOffset: '5px' }, | |
{ | |
outlineColor: '#52c5ea', | |
outlineOffset: '10px', | |
outlineWidth: '15px', | |
}, | |
{ outlineColor: '#448c4a', outlineOffset: '5px' }, | |
], | |
{ | |
duration: 1000, | |
iterations: 30, | |
}, | |
); | |
}); |