css-animations

CSS3 Spin Animation

余生颓废 提交于 2019-11-26 18:21:49
I have reviewed quite a few demos and have no idea why I can't get the CSS3 spin to function. I am using the latest stable release of Chrome. The fiddle: http://jsfiddle.net/9Ryvs/1/ div { margin: 20px; width: 100px; height: 100px; background: #f00; -webkit-animation-name: spin; -webkit-animation-duration: 40000ms; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear; -moz-animation-name: spin; -moz-animation-duration: 40000ms; -moz-animation-iteration-count: infinite; -moz-animation-timing-function: linear; -ms-animation-name: spin; -ms-animation-duration:

Rotate objects around circle using CSS?

◇◆丶佛笑我妖孽 提交于 2019-11-26 17:45:47
问题 I'm attempting to have three objects rotating around a circle. So far I've been able to get one object to spin around the circle. I am unable to get more than one without messing up the code. Could anyone advise on the best way to accomplish this? Here is part of the code and a Fiddle. Thanks! Here is the Demo .outCircle { width: 200px; height: 200px; background-color: lightblue; left: 270px; position: absolute; top: 50px; -moz-border-radius: 100px; -webkit-border-radius: 100px; border-radius

Background-image in keyframe does not display in Firefox or Internet Explorer

本秂侑毒 提交于 2019-11-26 16:48:31
I have several animations on my site that I just realized do not even show up in Firefox or Internet Explorer. I have the background-image within the keyframes. I do this because I have different images in different percentages with the animation. Why doesn't the background-image display within the keyframes in Firefox and Internet Explorer and is there a way to make this work? As per the specs , background-image is not an animatable or a transitionable property. But it does not seem to say anything about what or how the handling should be when it is used as part of transition or animation.

Continuous CSS rotation animation on hover, animated back to 0deg on hover out

感情迁移 提交于 2019-11-26 15:23:27
问题 I have an element that spins when you hover over it indefinitely. When you hover out, the animation stops. Simple: @-webkit-keyframes rotate { from { -webkit-transform: rotate(0deg); } to { -webkit-transform: rotate(360deg); } } .elem:hover { -webkit-animation-name: rotate; -webkit-animation-duration: 1.5s; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear; } When you hover out, though, the animation abruptly ceases, reverting to 0 degrees. I'd like to

Changing :hover to touch/click for mobile devices

大憨熊 提交于 2019-11-26 15:13:02
问题 I've had a look around but can't quite find what i'm looking for. I currently have a css animation on my page which is triggered by :hover. I would like this to change to 'click' or 'touch' when the page is resized past width 700px using media queries. Here is what i have at the moment: http://jsfiddle.net/danieljoseph/3p6Kz/ As you can see, the :hover will not work on mobile devices but i still want to ensure it works the same way just by click, not hover. I would rather use css if possible

Activate CSS3 animation when the content scrolls into view

守給你的承諾、 提交于 2019-11-26 15:05:29
I have a bar chart that animates with CSS3 and the animation currently activates as the page loads. The problem I have is that the given bar chart is placed off screen due to lots of content before it so by the time a user scrolls down to it, the animation has already finished. I was looking for ways either through CSS3 or jQuery to only activate the CSS3 animation on the bar chart when the viewer sees the chart. <div>lots of content here, it fills the height of the screen and then some</div> <div>animating bar chat here</div> If you scroll down really fast right after page load, you can see

Transform origin on SVGs in Firefox

巧了我就是萌 提交于 2019-11-26 13:52:19
I'm new to animating SVGs & I've come across a problem that only seems to happen in Firefox. I've created a animation here - http://codepen.io/iamali/pen/txvpo - of a sky scene. The sun should rotate & fade in & out. It works fine in Chrome, but for some reason it appears to ignore the transform-origin value in Firefox and the sun goes AWOL. Does anyone know of such an issue in Firefox? Or could it be anything else? I've tried Google all sorts of terms but there doesn't seem to be much out there on it. Thanks! transform-origin with percentage units works from Firefox 43 onwards . 来源: https:/

Combination of animation and transition not working properly

隐身守侯 提交于 2019-11-26 12:47:29
问题 I have been trying to put some basic CSS3 animation. The objective is to toggle a class on the click event of a button and animate a div based on the added class. The code works perfectly for the first iteration of toggle in Firefox but for other browsers like Chrome and for the next iteration in Firefox the transformation is toggled in a blink of an eye. Please help me to figure out what\'s going wrong. Snippet: $(\'button\').click(function() { $(\'div\').toggleClass(\'clicked\'); }); div {

CSS transition auto width

点点圈 提交于 2019-11-26 12:45:36
问题 I have an element whose width I\'d like to animate when its contents change. It has width: auto , and this never changes. I\'ve seen this trick, but that\'s for transitioning between two values and one is set. I\'m not manipulating the values at all, only the content, and I\'d like my element\'s size to change with animation. Is this at all possible in CSS? Here\'s a simplified version of my code: .myspan { background-color: #ddd; } .myspan:hover::after { content: \"\\00a0\\f12a\"; font

left-right movement.. css only very generic

五迷三道 提交于 2019-11-26 12:33:24
问题 I would like to write a generic css animation to move a div right and left, touching the edges of the container .. to be applied in a simple way to any div of which I know nothing except that it has an absolute positioning. The problem is that simply putting left at 0% and then at 100% .. for a few moments disappears, I should use something like calc (100% -width) .. Putting a 50% keyframe is almost like I would like, but there\'s a slowdown and it is not very fluid and linear ... Any