html - Full hover animation duration with quick mouseover/mouseout? -


i have hovering effect on image. if mouseover , stay there mouse, transition execute given duration.

i have done correct transition when leave spot.

now, want hover transition starts given duration, no matter if hovered on image quick 1millisecond.

is possible javascript?

.example { position: absolute;              left: 0;              height:320px;              bottom: 0;              width: 100%;              background: #000;              background-color: rgba(255, 255, 255, 0.4);              opacity:0;              -webkit-transition: background-color 2s ease-out;              -moz-transition: background-color 2s ease-out;              -o-transition: background-color 2s ease-out;              -ms-transition: background-color 2s ease-out;               transition: opacity 0.5s ease-in-out;              -moz-transition: opacity 0.5s ease-in-out;              -webkit-transition: opacity 0.5s ease-in-out;              -o-transition: opacity 0.5s ease-in-out;             -ms-transition: opacity 0.5s ease-in-out;              transition: opacity 0.5s ease-in-out;              text-align: center;              line-height: 299px;              text-decoration: none;              color: #000000;              font-size:30pt;           }     .image:hover .example { background-color: rgba(255, 255, 255, 0.4);                          -webkit-transition: background-color 0.5s  ease-in-out;                          -moz-transition: background-color 0.5s  ease-in-out;                          -o-transition: background-color 0.5s  ease-in-out;                          -ms-transition: background-color 0.5s ease-in-out;                          transition: background-color 0.5s ease-in-out;                          -webkit-transition: opacity 0.5s  ease-in-out;                          -moz-transition: opacity 0.5s  ease-in-out;                          -o-transition: opacity 0.5s  ease-in-out;                          -ms-transition: opacity 0.5s  ease-in-out;                          transition: opacity 0.5s ease-in-out;                          opacity:1;                        } 

with this, if hover on image, text , background colors animating in , when leave image text , background color animating out. works okay. (even though, above code bit unsorted now)

so, want fading in , out animation executed if hover fast on image , back.

i think not possible it? (with css mean)

i afraid, have use bit of javascript because far know, not possible without javascript.

add class on hover, , remove on animation end. refer answer know how - css3 animation on :hover; force entire animation

ps: have put comment, don't have privileges right now.


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -