Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
dragos cocos
Courses Plus Student 101 Pointsi what on hover to animate 2 fondings one on top of eachother so that the one in back to be the backface ?
HERE IS MY CODE :
I can make only one img to flip !
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Accordion Fold</title>
<style>
.view {
width: 600px;
height: 400px;
position: absolute;
top: 100px;
-webkit-perspective: 400 px;
-moz-perspective:400px;
-o-perspective: 400px;
-ms-perspective: 400px;
perspective: 400px;
}
.view .slice {
width: 200px;
height: 100%;
position: absolute;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform-origin: left center ;
-moz-transform-origin: left center;
-o-transform-origin: left center;
-ms-transform-origin: left center;
transform-origin: left center;
-webkit-transition: -webkit-transform 1s ease-in-out;
-moz-transition: -moz-transform 1s ease-in-out;
-o-transition: -o-transform 1s ease-in-out;
-ms-transition: -ms-transform 1s ease-in-out;
transition: transform 1s ease-in-out;
-webkit-backface-visibility: visible;
-moz-backface-visibility: visible;
-o-backface-visibility: visible;
-ms-backface-visibility: visible;
backface-visibility: visible ;
}
.view s1 ,.view .s2,.view .s3 {
-webkit-transform: translate3d(200px,0,0);
-moz-transform: translate3d(200px,0,0);
-o-transform: translate3d(200px,0,0);
-ms-transform: translate3d(200px,0,0);
transform: translate3d(200px,0,0);
}
.view .s1 {
background-position: 0px 0px;
}
.view .s2 {
background-position: -200px 0px;
}
.view .s3 {
background-position: -400px 0px;
}
.view:hover .s1 {
-webkit-transform: translate3d(200px,0,0) rotate3d(0,1,0,135deg);
}
.view:hover .s2 {
-webkit-transform: translate3d(200px,0,0) rotate3d(0,1,0,-85deg);
}
.view:hover .s3 {
-webkit-transform: translate3d(200px,0,0) rotate3d(0,1,0,-140deg);
}
.view b1 ,.view .b2,.view .b3 {
-webkit-transform: translate3d(200px,0,0);
-moz-transform: translate3d(200px,0,0);
-o-transform: translate3d(200px,0,0);
-ms-transform: translate3d(200px,0,0);
transform: translate3d(200px,0,0);
}
.view .b1 {
background-position: 0px 0px;
}
.view .b2 {
background-position: -200px 0px;
}
.view .b3 {
background-position: -400px 0px;
}
.view:hover .b1 {
-webkit-transform: translate3d(200px,0,0) rotate3d(0,1,0,135deg);
}
.view:hover .b2 {
-webkit-transform: translate3d(200px,0,0) rotate3d(0,1,0,-85deg);
}
.view:hover .b3 {
-webkit-transform: translate3d(200px,0,0) rotate3d(0,1,0,-140deg);
}
</style>
</head>
<body>
<div class="view">
<div class="slice s1" style="background-image: url(http://www.mtbtours.ro/wp-content/gallery/prin-bucegi-in-miez-de-vara/img_5771.jpg); ">
<div class="slice s2" style="background-image: url(http://www.mtbtours.ro/wp-content/gallery/prin-bucegi-in-miez-de-vara/img_5771.jpg); ">
<div class="slice s3" style="background-image: url(http://www.mtbtours.ro/wp-content/gallery/prin-bucegi-in-miez-de-vara/img_5771.jpg); ">
</div>
</div>
</div>
</div>
<div class="view">
<div class="slice b1" style="background:#ccc; ">
<div class="slice b2" style="background:#ccc; ">
<div class="slice b3" style="background:#ccc; ">
</div>
</div>
</div>
</div>
</body>
</html>
Sam Cooper
502 PointsSam Cooper
502 PointsWhat do you mean by "fondings"?