I have this CSS code that only displays one color (blue) when there's a mouse hover.
.MenuBox {
transition: all 1.0s ease;
-moz-border-radius:30px;
-webkit-border-radius:30px;
border-radius:30px;
border: #solid 10px #000;
background-color: rgba(255,255,255,0.5);
width:auto;
height:auto;
margin-left: auto ;
margin-right: auto ;
padding:10px;
display: inline-block;
}
.MenuBox:hover{
transition: all 1.0s ease;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
-webkit-box-shadow: 0px 0px 30px 0px rgba(0, 0, 255, 0.67);
-moz-box-shadow: 0px 0px 30px 0px rgba(0, 0, 255, 0.67);
box-shadow: 0px 0px 30px 0px rgba(0, 0, 255, 0.67);
}
.MenuBox:last-of-type:hover{
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
-webkit-box-shadow: 0px 0px 30px 0px rgba(0, 0, 255, 0.67);
-moz-box-shadow: 0px 0px 30px 0px rgba(0, 0, 255, 0.67);
box-shadow: 0px 0px 30px 0px rgba(0, 0, 255, 0.67);
}
I want to show a random color every time there's a mouse hover on that div
how do I do that? I don't think it's possible to use CSS only, sorry for the dumb question. I'm still learning about programming languages.
Update:
I don't want to change the background-color
but I want to change the color in:
-webkit-box-shadow: 0px 0px 30px 0px rgba(0, 0, 255, 0.67);
-moz-box-shadow: 0px 0px 30px 0px rgba(0, 0, 255, 0.67);
box-shadow: 0px 0px 30px 0px rgba(0, 0, 255, 0.67);
How do I do that ?