I am working on an image with a gradient that disappears on hover. However, I can't get this to transition. I've tried every webkit transition that I know of and it doesn't seem to want to work.
Here's the HTML:
<a href="http://calvarygigharbor.com/heavenly-hitters/">
<div class="tinted-image"> </div></a>
With this CSS:
.tinted-image {
-webkit-transition: all .7s ease;
transition: all .7s ease;
position: relative;
width: 100%;
padding-top: 56.25%; /* 16:9 Aspect Ratio */
border-radius: 10px;
background:
linear-gradient(
rgba(255, 0, 0, 0.6),
rgba(237,240,0,0.6)
),
/* image */
url(http://calvarygigharbor.com/wp-content/uploads/2018/05/church-softball-2018.jpg);
background-size: contain;
}
.tinted-image:hover {
-webkit-transition: all .7s ease;
transition: all .7s ease;
position: relative;
width: 100%;
padding-top: 56.25%; /* 16:9 Aspect Ratio */
border-radius: 10px;
background:
/* image */
url(http://calvarygigharbor.com/wp-content/uploads/2018/05/church-softball-2018.jpg);
background-size: contain;
}
The picture and hover work beautifully minus the transition. How would you get a transition to work with this?
URL: http://calvarygigharbor.com/css-testing/