Alexis
Alexis

Reputation: 25193

Higher level CSS animation library?

I looked around but can't find any good resources for doing higher level animations (like card flip, cubes, etc). Like a ???:CSS :: jQuery:JS.

I know of transit but I'm looking for something that has more functionality and animations built in.

Upvotes: 1

Views: 2667

Answers (3)

Frank Lämmer
Frank Lämmer

Reputation: 2325

Effeckt.css is STILL work in progress but look very promising– a pattern libary of multiple sources.

Upvotes: 0

user1467267
user1467267

Reputation:

An edited version of this one: http://css3.bradshawenterprises.com/flip/:

JSfiddle: http://jsfiddle.net/PnUHr/1/

CSS

#f1_container {
    position: relative;
    margin: 10px auto;
    width: 450px;
    height: 281px;
    z-index: 1;
}
#f1_container {
    -webkit-perspective: 1000;
    perspective: 1000;
}
#f1_card {
    width: 100%;
    height: 100%;
    -webkit-transform-style: preserve-3d;
    -webkit-transition: all 1.0s linear;
    transform-style: preserve-3d;
    transition: all 1.0s linear;
}
#f1_container:hover #f1_card {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
    box-shadow: -5px 5px 5px #aaa;
}
.face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.face.back {
    display: block;
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
    box-sizing: border-box;
    color: white;
    text-align: center;
    background-color: #aaa;
}

HTML

<div id="f1_container">
    <div id="f1_card" class="shadow">
        <div class="front face">
            <img src="Cirques.jpg"/>
        </div>
        <div class="back face center">
            <img src="Cirques.jpg" style="transform:scaleX(-1), transform:scaleY(-1)"/>
        </div>
    </div>
</div>

All credits go to the original created (see link). I've just removed the padding that was on the back-facing <div> and added a mirrored background of the front-facing image.

For Mozilla/Gecko browsers you need to add the -moz-* prefixes too. Same for Opera (-o-*) and Internet Explorer (-ms-*`).

Direct image link: http://css3.bradshawenterprises.com/images/Cirques.jpg

Upvotes: 0

dsgriffin
dsgriffin

Reputation: 68616

Have you thought about using Animate.css? Seems pretty good. Another good one seems like CSS3 Animations and for stuff like card-flipping, CSS3 Playground.

Upvotes: 1

Related Questions