JSFiddle - React, Tailwind, and code Playground
HTML
<div id="border-change">
<p>Across the <strong>sea</strong> of <em>space</em>, the <a class="btn" href="#">stars</a> are <span>other</span> <button>suns</button>.</p>
</div>
CSS
div{
background-color: red;
color: yellow;
border-width: 5px;
border-style: solid;
padding: 20px;
}
JavaScript
var element = document.getElementById("border-change");
var colors = ['pink','purple','yellow','green','silver','lime']
setInterval(function(){
element.style.color = colors[Math.floor(Math.random()*colors.length)];
}, 500);