I want to use one class for 3 buttons but with different background-image such that each button will have its own image. I was looking to declare a background-image array in css and then retrieve the image. However as per my research, there is no array declaration in css. Is this right? If yes what alternative do I have to retrieve each image for each button?
HTML
...
...
<button class="access_item">
<span class="access_icon">
</span>
Button_1
</button>
<button class="access_item">
<span class="access_icon">
</span>
Button_2
</button>
<button class="access_item">
<span class="access_icon">
</span>
Button_3
</button>
...
CSS
.access_item {
display: inline-block;
background: none;
border: 0;
cursor: pointer;
appearance: none;
}
.access_icon {
display: block;
width: 50px;
height: 50px;
border-radius: 50%;
background-image: url("https://picsum.photos/id/237/200/300"); //Image 1
background-image: url("https://picsum.photos/seed/picsum/200/300"); //Image 2
background-image: url("https://picsum.photos/200/300/?blur"); //Image 3
margin-bottom: 20px;
}