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 04-24-2011, 07:34 PM   PM User | #1
java_man
New to the CF scene

 
Join Date: Apr 2011
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
java_man is an unknown quantity at this point
Setting up CSS3/HTML5 rotate animation keyframes?

Hi, I have a spinner on my site, and at the moment its rotating in one direction, back and forth 60 degrees.. which is good, and it looks smooth, but I want it to go --

start at -60deg - to 120deg - back to -60deg

and I'm not sure how to add in another keyframe. Here's my code.

Code:
#spinner {
	position: absolute;
	top: -3px;
	left: 168px;
	margin: 0px 0 0 0px;
	height: 72px;
	width: 72px;
	text-indent: 250px;
	white-space: nowrap;
	overflow: hidden;
	-webkit-mask-image: url(logo.png);
	-webkit-animation-name: spinnerRotate;
	-webkit-animation-duration: 8s;
	-webkit-animation-iteration-count: infinite;
	-webkit-animation-timing-function: linear;
}

@-webkit-keyframes spinnerRotate {
	from {
		-webkit-transform: rotateY(-60deg);
	}
	to {
		-webkit-transform: rotateY(60deg);
	}
}
Thanks everyone.
java_man is offline   Reply With Quote
Old 04-24-2011, 11:40 PM   PM User | #2
Mooseman
Regular Coder

 
Mooseman's Avatar
 
Join Date: Sep 2010
Posts: 118
Thanks: 7
Thanked 3 Times in 3 Posts
Mooseman is an unknown quantity at this point
What browser are you using? I believe only nightly Webkit builds support some of your code.
Mooseman is offline   Reply With Quote
Old 04-25-2011, 12:57 AM   PM User | #3
java_man
New to the CF scene

 
Join Date: Apr 2011
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
java_man is an unknown quantity at this point
On the upside, it works in my plain old Safari 4, but on the downside, yeah, I need help adding in support for IE9/10 (8?) and Firefox..

Additionally, can I do keyframes containing multiple motion tweens? example, zoom, flip, rotate, scale, etc.



(edit - For example, I'm working on one object that -

1. Fades opacity from 0.5 to 1.

2. Zooms

3. Rotates up and down about 30 degrees.

It's not there just yet, I will post the code for this one momentarily..)

Last edited by java_man; 04-25-2011 at 01:02 AM..
java_man is offline   Reply With Quote
Old 04-25-2011, 12:42 PM   PM User | #4
Mooseman
Regular Coder

 
Mooseman's Avatar
 
Join Date: Sep 2010
Posts: 118
Thanks: 7
Thanked 3 Times in 3 Posts
Mooseman is an unknown quantity at this point
Any CSS with -webkit- or -moz- etc. will only work in the one browser. -webkit- is Safari, so you're okay there. I don't know if this can help you: http://addyosmani.com/blog/css3transitions-jquery/. I haven't used it, but the demo works in IE8.

About IE9. It works...in theory. It does not support transitions. We can only hope for IE10.

Hope this helps!
Mooseman is offline   Reply With Quote
Users who have thanked Mooseman for this post:
java_man (04-25-2011)
Old 04-25-2011, 08:59 PM   PM User | #5
java_man
New to the CF scene

 
Join Date: Apr 2011
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
java_man is an unknown quantity at this point
Fair enough.. That clears things up a bit. Thanks!
java_man is offline   Reply With Quote
Reply

Bookmarks

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:11 AM.


Advertisement
Log in to turn off these ads.