I have a div that I want to have a transition effect on hover.
I put together the following CSS code, but the transition is not working in chrome nor firefox.
#header {
border: 0.1px solid #666;
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
height: 10vh;
padding: 0;
transition: background-image 1s ease-in-out; /* NOT WORKING */
-webkit-transition: background-image 1s ease-in-out; /* NOT WORKING */
}
#header:hover {
background-image: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.0));
}
<html>
<body>
<div id="header"> this is my header</div>
</body>
</html>
Am I doing anything wrong?
Would be great if anyone could help!!
Many thanks