I have a div on my website with margins only, and I'm looking to create a cool effect when the page loads. I want it to look like there is a circuit running through the div, starting from the positive terminal (where a battery image overlaps the div) and changing color to yellow as it moves towards the negative terminal. I'm not sure if this can be done using CSS alone, but I'm intrigued by its possibilities.
Below is the code for my div tag:
#circuit {
width: 80%;
border: 10px solid navy;
margin: 25px;
height: 80%;
margin-left: auto;
margin-right: auto;
}
html,
body {
height: 100%;
margin: 0;
}
<div id="circuit"></div>