Currently on my style sheet I have the following:
a {
box-shadow: inset 0 -1.3vw 0 0 #AFFFFF;
}
This creates a fake custom underline.
I want it so that every time the page is loaded or refreshed the color of the border changes to a random color specified in the array.
I found this script here a little while ago:
var colors = ['#ff0000', '#00ff00', '#0000ff'];
var random_color = colors[Math.floor(Math.random() * colors.length)];
document.getElementById('title').style.color = random_color;
How do I go about doing this the right way?