I have a list that I want to give a metal/metallic background for each item in the list using DOM manipulation.
List using Bootstrap 4
<ul id="items" class="list-group">
<li class="list-group-item">Item 1</li>
<li class="list-group-item">Item 2</li>
<li class="list-group-item">Item 3</li>
<li class="list-group-item">Item 4</li>
</ul>
This is my attempt to style the background of the class.
var backGroundMetallic = document.getElementsByClassName("list-group");
for(var i = 0; i < backGroundMetallic.length; i++) {
backGroundMetallic[i].style.backgroundColor = '#7fffd4';
}
I'm only able to put use one CSS color. Is there a way to reference a CSS class so I can use more than one style in order to style the background for the list to achieve making it metal/metallic?