css-animations

Why can't I animate custom properties (aka CSS variables)?

帅比萌擦擦* 提交于 2020-01-02 05:22:12
问题 See this animation: The golden div has an animation where a custom property is animated ( @keyframes roll-o-1 animates --o ). This animates in steps. The silver div has an animation where a normal property is animated ( @keyframes roll-o-2 animates left ). This animates continuously. Why doesn't the golden div animate smoothly? Is there any workaround which also uses variables? #one { width: 50px; height: 50px; background-color: gold; --o: 0; animation: roll-o-1 2s infinite alternate ease-in

Aurelia.js: How do I animate an element when bound value changes?

99封情书 提交于 2020-01-02 03:29:14
问题 I am using Aurelia.js for my UI. Let's say I have the following view markup: <tr repeat.for="item in items"> <td>${item.name}</td> <td>${item.value}</td> </tr> Which is bound to a model "items". When one of the values in the model changes, I want to animate the cell where the changed value is displayed. How can I accomplish this? 回答1: This can be done with Aurelia custom attributes feature. Create a new javascript file to describe the attribute (I called the attribute "animateonchange"):

Cross-Browser CSS3 Keyframe Animation Firefox

怎甘沉沦 提交于 2020-01-02 02:22:33
问题 I have a simple "pulsating" effect on the play-button (which is an anchor tag), using CSS3 and keyframes. While it works flawlessly in Chrome and Safari, it doesn't seem to be working in Firefox. Does anyone have an idea on why? li > a { -webkit-animation: pulsate 3s ease-in-out; -moz-animation: pulsate 3s ease-in-out; -o-animation: pulsate 3s ease-in-out; animation: pulsate 3s ease-in-out; -webkit-animation-iteration-count: infinite; -moz-animation-iteration-count: infinite; -o-animation

Animating SVG paths with discontinuous parts

怎甘沉沦 提交于 2020-01-01 16:48:23
问题 In the left example the path is continuous (i.e. no m commands), hence the segments of the path are drawn one after another. In the right example the path is discontinuous (i.e. containing m commands), which causes all segments to be drawn at once. How can I make the segments in the right example be drawn one after another? That is, the second stroke starting only when the topmost stroke is finished instead of both starting simultaneously. <svg width="220px" height="100px" viewBox="-10 -10

Animating SVG paths with discontinuous parts

房东的猫 提交于 2020-01-01 16:47:10
问题 In the left example the path is continuous (i.e. no m commands), hence the segments of the path are drawn one after another. In the right example the path is discontinuous (i.e. containing m commands), which causes all segments to be drawn at once. How can I make the segments in the right example be drawn one after another? That is, the second stroke starting only when the topmost stroke is finished instead of both starting simultaneously. <svg width="220px" height="100px" viewBox="-10 -10

Why are slow jQuery animations choppy?

微笑、不失礼 提交于 2020-01-01 08:23:52
问题 I'm having a hard time googling this issue because most of the things I can find are about animations that are supposed to be fast but are acting slow. My question is regarding an animation that I want to have a long duration but still be smooth. I've created this jsfiddle to demonstrate the issue: http://jsfiddle.net/93Bqx/ I'm trying to make an element slowly move to another position over time. But the animation is very choppy. Basically, it boils down to something like this: $elem.animate(

infinite loop slider using keyframes css3

落花浮王杯 提交于 2019-12-31 01:10:07
问题 I was making a slider using css3 keyframes. I don't want my last slide directly jump to first slide. I found some questions related to it and found that duplicating the first image trick will work. It works fine first time, but second time the first slide take double time compare to normal time which is obvious because last slide and first slide are same. So is there any way to resolve this issue? Also I found this answer , in this the last solution is too close to answer this question, but

CSS transition ignores width

十年热恋 提交于 2019-12-30 18:34:50
问题 I have an tag which is displayed as a block. On page load, its width is increased by a css animation from zero to some percentage of the containing div (the fiddle contains a MWE, but there is more than one link in this div, each with a different width). On hover, I want it to change colour, change background colour, and also expand to 100% of the div, using a CSS transition . The colour and background colour bit is working, but it seems to ignore the width transition. Snippet: .home-bar {

Grouping CSS @keyframes rules

我们两清 提交于 2019-12-30 18:34:30
问题 I completely understand that you cannot group animation keyframes selectors such as @keyframes, @-moz-keyframes, @-webkit-keyframes { /*do something*/ } and that you absolutely MUST do @keyframes { /*do something*/ } @-moz-keyframes { /*do something*/ } @-webkit-keyframes { /*do something*/ } I know there are pre-processors that can do all this for me. But I am more interested in the reason behind why this is the case? My google-fu is failing me. It seems to always direct me to a

CSS transition ignores width

独自空忆成欢 提交于 2019-12-30 18:34:27
问题 I have an tag which is displayed as a block. On page load, its width is increased by a css animation from zero to some percentage of the containing div (the fiddle contains a MWE, but there is more than one link in this div, each with a different width). On hover, I want it to change colour, change background colour, and also expand to 100% of the div, using a CSS transition . The colour and background colour bit is working, but it seems to ignore the width transition. Snippet: .home-bar {