Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-28-2012, 06:11 AM   PM User | #1
aaronhockey_09
Regular Coder

 
Join Date: Dec 2010
Posts: 411
Thanks: 21
Thanked 55 Times in 55 Posts
aaronhockey_09 is an unknown quantity at this point
Exclamation CSS3 Animation Help

Hey guys,
So to start here is the site - http://aaron-armstrong.com/new-a/
Im trying to make a div slide in and out on the click of a div.
If you click on the navigation items you can top, left, bottom and right you can see items slide in and out.

But for some reason when i click on the bottom or right navigation item.
Not only does it not actually slide out ( snaps instead. ) but it also does not go back to the original place.

Here is the corresponding CSS - you shouldnt need the HTML as it is being called just fine.

CSS
Code:
.top { margin-top: -100%;  z-index: 999; background:url(../images/green.svg) 50% 50% fixed; background-size: 100% 100%; color:$white; position: absolute; }
.bottom { margin-top: 100%;  z-index: 999; background:url(../images/purp.svg) 50% 50% fixed; background-size: 100% 100%; color:$white; position: absolute; }
.left { margin-left: -100%;   z-index: 999 ;background:url(../images/yell.svg) 50% 50% fixed; background-size: 100% 100%;color:$white; position: absolute; 
	.vert-middle { height: 100%; top:0;
		.two-thirds, .one-third { height: 70%; margin-top: 15%; background:url(../images/buttons-bg.png) 0 0 repeat; }
	}
}
.right { margin-left: 100%; z-index: 999; background:url(../images/orange.svg) 50% 50% fixed; background-size: 100% 100%; color:$white; position: absolute; 
	.vert-middle { height: 100%; top:0;
		.sixteen { height: 70%; margin-top: 15%; background:url(../images/buttons-bg.png) 0 0 repeat; 
			.two-thirds, .one-third { margin:0;}
			article { padding-bottom:10px; border-bottom:1px solid #fff; margin-bottom: 20px;
				&:last-child { border:none;}
			}
		}
	}
}


#top:target { margin-top:0;
		.bottom-home { display: block;}
	}
	#bottom:target { margin-top:0; 
		.top-home { display: block;}
	}
	#left:target { margin-left:0; 
		.right-home { display: block;}
	}
	#right:target { margin-left:0; 
		.left-home { display: block;}
	}
Any help would be greatly appreciated.
aaronhockey_09 is offline   Reply With Quote
Old 11-28-2012, 06:14 AM   PM User | #2
aaronhockey_09
Regular Coder

 
Join Date: Dec 2010
Posts: 411
Thanks: 21
Thanked 55 Times in 55 Posts
aaronhockey_09 is an unknown quantity at this point
The animation transition is coming from here,
Sorry i forgot to post this.

Code:
.full { width:100%; z-index: 2; height: 100%; top:0; left:0; position: absolute; overflow: hidden; @include transition(all 0.2s ease-in-out);}
aaronhockey_09 is offline   Reply With Quote
Old 11-28-2012, 08:11 PM   PM User | #3
aaronhockey_09
Regular Coder

 
Join Date: Dec 2010
Posts: 411
Thanks: 21
Thanked 55 Times in 55 Posts
aaronhockey_09 is an unknown quantity at this point
any help anyone ?
Been having this problem for quite some time and can't find a solution
aaronhockey_09 is offline   Reply With Quote
Old 11-28-2012, 09:22 PM   PM User | #4
CHEWX
Regular Coder

 
Join Date: Dec 2010
Posts: 124
Thanks: 17
Thanked 6 Times in 6 Posts
CHEWX is an unknown quantity at this point
Have you seen http://daneden.me/animate/
CHEWX is offline   Reply With Quote
Old 11-28-2012, 09:26 PM   PM User | #5
aaronhockey_09
Regular Coder

 
Join Date: Dec 2010
Posts: 411
Thanks: 21
Thanked 55 Times in 55 Posts
aaronhockey_09 is an unknown quantity at this point
Thanks !
Will take a look at it, and might just use these pre-built animations if i can.
aaronhockey_09 is offline   Reply With Quote
Reply

Bookmarks

Tags
animation, css3, html5, snap, transition

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:37 AM.


Advertisement
Log in to turn off these ads.