0

I found a partial solution to delaying/pausing the mouseover effect using css and/or jquery, and it applied by making that hover state last, but I'm having no success with a specific case. Here is the styling:

figure.effect-sadie figcaption::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: -webkit-linear-gradient(top, rgba(72,76,97,0) 0%, rgba(72,76,97,0.8) 75%);
    background: linear-gradient(to bottom, rgba(72,76,97,0) 0%, rgba(72,76,97,0.8) 75%);
    content: '';
    opacity: 0;
    -webkit-transform: translate3d(0,50%,0);
    transform: translate3d(0,50%,0);
    background-repeat: no-repeat;


}

figure.effect-sadie h2 {
    position: absolute;
    top: 70%;
    left: 2%;
    right:2%;
    width: 100%;
    color: #ffffff;
    -webkit-transition: -webkit-transform 0.5s 5.5s, color 5.5s;
    transition: transform 0.5s 5.5s, color 0s 5.5s;
    -webkit-transform: translate3d(0,-5%,0);
    transform: translate3d(0,-5%,0);
    visibility: hidden;
    z-index: 0;

}

.contain:hover figure.effect-sadie h2 {
    color: #fff;
    -webkit-transform: translate3d(0,-5.5%,0) translate3d(0,-4px,0);
    transform: translate3d(0,-5.5%,0) translate3d(0,-4px,0);
    z-index: 10;
    visibility: visible;
    transform: 1.5s ease-in-out infinite;
    transition: transform 0.5s;
}


figure.effect-sadie figcaption::before,
figure.effect-sadie p {
    -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
    transition: opacity 0.35s, transform 0.35s;

}

figure.effect-sadie p {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 2em;
    width: 100%;
    opacity: 0;
    -webkit-transform: translate3d(0,10px,0);
    transform: translate3d(0,10px,0);

}

figure.effect-sadie:hover figcaption::before ,
figure.effect-sadie:hover p {
    opacity: 0.5;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
    z-index: 5;
    display:block;

}

Markup is like so:

<div class="hoverme">    
<figure class="effect-sadie">
                            <figcaption>
                                <a href="#"><h2>URL</h2></a>
                            </figcaption>
                        </figure>
</div>

Specifically, I want the linear gradient, and h2 hover states to last (for ~5s or until page reload) when the div is triggered, with no success. Any jquery or css solutions here? Thanks

DNburtonguster
  • 367
  • 3
  • 14

0 Answers0