- This topic is empty.
-
AuthorPosts
-
August 31, 2012 at 9:27 am #39594
vonKristoff
MemberHey guys,
Im trying to build a simple 3D pop over thingy, >update (see hot link below in other comment for view )< when I roll over an image - the image lifts like a trap door, and reveals the accompanying text underneath. So I have built it thus far .. For starters - the animation hovers are all over the place although they are set to be the same times - it makes syncing animations real sucky...
Anyone up for turning this into something cool?
HTML
descripton goes here
CSS
.shadow{
background-image: -webkit-gradient(linear,
left top, left bottom,
from(rgba(0,0,0,.3)), to(rgba(0,0,0,0)),
color-stop(1,#000));
}
.flipper{
overflow:hidden;
width:150px;
height:300px;
background:black;
-webkit-transition: all 1s;
box-shadow: 0px 0px 0px rgba(0,0,0,.4);
.door{
position:absolute;
-webkit-transition: all .3s linear;
-webkit-transform-origin:0% 0;
background:url(img/flip.jpg);
width:150px;
height:300px;
}
.trap{
position:relative;
-webkit-transition: all .3s linear;
width:150px;
height:50px;
background:blue;
margin-top:300px;
text-align:center;
line-height:50px;
}
.shadow{
-webkit-transition: all .3s linear;
width:150px;
height:0px;
position:absolute;
}
}
.flipper:hover{
box-shadow:0px -5px 10px rgba(0, 0, 0, 0.4);
.door{
-webkit-transform:rotateX(34deg);
}
.trap{
margin-top:250px;
}
.shadow{
height:250px;
}
}
SORRY – JUST DOING IT IN WEBKIT
August 31, 2012 at 10:34 am #108818Paulie_D
MemberYou mean like this? https://css-tricks.com/garage-door-style-menu/
August 31, 2012 at 11:30 am #108821vonKristoff
MemberNo .. this is what it’s like at the moment – you’ll spot the subtle difference .. >
ps.
sorry for the messy code – it was pasted in ../August 31, 2012 at 11:50 am #108824Paulie_D
MemberNot sure you need all those divs…I’ve usually found that the figure & figcaption elements work better. No need for those background images.
I haven’t done anything about the 3D thing you are trying or the transitions but this is a little cleaner code-wise, I feel.: http://codepen.io/Paulie-D/pen/AJfgy
August 31, 2012 at 8:32 pm #108835joshuanhibbert
MemberIs this the sort of thing that you are after? http://codepen.io/joshnh/pen/FlvJr
September 1, 2012 at 8:10 am #108843vonKristoff
Memberhey bro – thats good! it works really well. Nice touch of perspective makes it look cool.
Ultimately I was looking to ‘attach’ the caption on to the end of the trap door, as if it were attached perpendicularly. Thus the caption would be 3D too.
yet I like it just as, and its simple code :)September 1, 2012 at 8:14 am #108844vonKristoff
MemberQUICK Q – I notice in code pen u use ‘transition’ etc is this because it’s standard css3 now – or does codepen convert it into the right css dependant on the viewers browser?
September 1, 2012 at 11:15 am #108847joshuanhibbert
MemberAhh, I think I get what you mean now. Here’s something I made a while ago: http://codepen.io/joshnh/full/qhGfE
Oh, and I am using Prefix-Free so that I don’t have to write out all the browser prefixes.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.