Вопрос

Hi all that is my first question here :)

How can i reverse animation when mouse leave element?

http://jsfiddle.net/ps3PT/

<ul class="thumb-list">
    <li>
        <a href=""><img  src="photo.jpg" alt="BlaBla"></a>
    </li>
    <li>
        <a href=""><img  src="photo.jpg" alt="BlaBla"></a>
    </li>
    <li>
        <a href=""><img  src="bd2.png" alt="BlaBla"></a>
    </li>
</ul>
Это было полезно?

Решение

In this case, you should use a CSS transition as opposed to an animation. In doing so, the element can be transitioned when hovering on/off. Just place the transition properties on the img element itself.

Updated Example

.thumb-list li a img {
    height: 128px;
    width: 128px;
    border: 20px solid rgba(0, 0, 0, 0.3);
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    transition:all 1s ease;
    -webkit-transition:all 1s ease;
    -moz-transition:all 1s ease;
}
.thumb-list li a img:hover {
    -moz-border-radius: 30%;
    -webkit-border-radius: 30%;
    border-radius: 30%;
}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top