Here is a picture of my menu on the website I am developing. I am trying to make it so that when someone hovers over the list items: Wind, Water or fire, their background change color by random.
For example hovering over Wind:
I am trying to do this in Javascript, CSS and HTML exclusively.
Relevant code:
[class*="Starsignpica-"] {
display: block;
color: black;
text-decoration: none;
padding-left: 8px;
text-align: left;
line-height: 200%;
<!--border:1px solid red;-->
height: 30px;
background-color: white;
box-shadow: 1px 1px 5px #FFFFFFF;
}
ul.menu1 a.Starsignpica-1{
background-image: url('wind1.jpg');
background-size: 30px 32px;
background-repeat: no-repeat;
background-position: 100% 100%
}
ul.menu1 a.Starsignpica-2{
background-image: url('wind1.jpg');
background-size: 30px 32px;
background-repeat: no-repeat;
background-position: 100% 100%
}
ul.menu1 a.Starsignpica-3{
background-image: url('wind1.jpg');
background-size: 30px 32px;
background-repeat: no-repeat;
background-position: 100% 100%
}
[class*="Starsignpica-"]:hover {
onmouseover ="onmousetop()";
background-color: green;
}
<script>
function mouseontop(){
alert("hello");
}
</script>