css-animations

How to keep styles after animation?

安稳与你 提交于 2019-11-28 08:57:22
I'm working at a portfolio to show when I apply for my next study. Since we're living in 2012, it has tons of fancy animations and CSS3 junk, just to give them the 'We need this guy' feeling. I'm having a little problem at the moment. This is a small part of a specific element: /* This is the CSS of the elements with the id called 'fadein' */ #fadein { -moz-animation-duration: 2s; -moz-animation-name: item; -moz-animation-delay: 4.5s; -webkit-animation-duration: 5s; -webkit-animation-name: item; -webkit-animation-delay: 4.5s; opacity:0; -webkit-opacity:0; } @-webkit-keyframes item { from {

How to set keyframes name in LESS

半世苍凉 提交于 2019-11-28 08:57:21
I try to set up this LESS mixin for CSS animation keyframes: .keyframes(@name, @from, @to) {; @-webkit-keyframes "@name" { from { @from; } to { @to; } } } but there is some problem with name pharse, is there any option to do this corectly? As of LESS >= 1.7 you can use variables for keyframe keywords (names). Some changes have been made in LESS 1.7 to how directives work, which allows to use variables for the name/keyword of @keyframes (so the example from the question should work now). DEMO Unfortunately keyframes names can not be dynamically generated in LESS <= 1.6 Hence, the normal way of

Firefox animation not starting on toggle display style

别说谁变了你拦得住时间么 提交于 2019-11-28 07:34:46
问题 Fiddle http://jsfiddle.net/B9h8y/1/ In chrome when I click the doc the animation runs. In firefox it doesn't. Why doesn't firefox trigger css animations when display is set to block like in chrome ? <link rel="stylesheet" href="animate.min.css" /> <div class="el bounce animated"> The div </div> <script type="text/coffeescript"> $('.el').css(display: 'none') $(document).on 'click', -> $('.el').css(display: 'block') <script> 回答1: After research and testing, the real question actually appears to

css animation how to use “reverse” for a hover and out event?

眉间皱痕 提交于 2019-11-28 06:19:03
问题 Given this code (http://jsfiddle.net/bzf1mkx5/) .intern { -webkit-animation: in 1s 1 reverse forwards; } .intern:hover { -webkit-animation: in 1s 1 normal forwards; } @-webkit-keyframes in { from { -webkit-transform: scale(1); } to { -webkit-transform: scale(1.2);} } <div style = "width : 100px; height : 100px; background-color : red" class ="intern"></div> Why are animations absent? Where is the mistake? EDIT: By using two separated animations it does work, but then what's the point of

LESS CSS Pass mixin as a parameter to another mixin

青春壹個敷衍的年華 提交于 2019-11-28 05:59:23
Is there any way to pass one mixin or style's declaration to another mixin as an input parameter? Let's take a look at an example with animation keyframes. Following is how we define keyframes in pure CSS: @-moz-keyframes some-name { from { color: red; } to { color: blue; } } @-webkit-keyframes some-name { from { color: red; } to { color: blue; } } @keyframes some-name { from { color: red; } to { color: blue; } } Idea is to simplify these declarations using mixins, so we can have something like following: .keyframes(name, from, to) { // here we need somehow to reproduce structure // that we

How to prevent css3 animation reset when finished? [duplicate]

北城余情 提交于 2019-11-28 05:37:37
This question already has an answer here: Stopping a CSS3 Animation on last frame 8 answers I write a css3 animation and it is only performed once. The animation works well, but it will reset when the animation finished. How can I avoid this, I want to keep the result instead of reset it. $(function() { $("#fdiv").delay(1000).addClass("go"); }); #fdiv { width: 10px; height: 10px; position: absolute; margin-left: -5px; margin-top: -5px; left: 50%; top: 50%; background-color: red; } .go { -webkit-animation: spinAndZoom 1s 1; } @-webkit-keyframes spinAndZoom { 0% { width: 10px; height: 10px;

How I can animate circular progress bar from left to right?

走远了吗. 提交于 2019-11-28 05:28:17
问题 I have a circle progress bar, only with HTML and CSS, I used keyframes for loading (animation). But the loading is from right to left I wanna reverse it. I edit my CSS keyframes but nothing at all. I try also animation reverse again nothing. Fiddle: https://jsfiddle.net/d20wu8e4/ My Result (image): https://ibb.co/0KCSsZY What I want: https://ibb.co/MGCpHqS * { box-sizing:border-box; } .progress { width: 150px; height: 150px; background: none; margin: 0 auto; box-shadow: none; position:

CSS animate custom properties/variables

扶醉桌前 提交于 2019-11-28 04:57:29
问题 I have been trying to get this to work for a while. The point is that the inner div will have some shape and there will probably more than one (That's why I used the nth-child selector). This inner div is supposed to be shown and then be hidden again both for some set amount of time. the problem is, that I would like to animate all the (later) multiple inner divs in one animation. For this I thought I could use CSS variables, but this does not seem to work. What I am trying to archieve in

Run CSS3 animation only once (at page loading)

雨燕双飞 提交于 2019-11-28 04:29:04
I'm making a simple landing page driven by CSS3. To make it look awesome there's an <a> plopping up: @keyframes splash { from { opacity: 0; transform: scale(0, 0); } 50% { opacity: 1; transform: scale(1.1, 1.1); } to { transform: scale(1, 1); } } And to make it even more awesome I added a hover animation: @keyframes hover { from { transform: scale(1, 1); } to { transform: scale(1.1, 1.1); } } But there comes the problem! I assigned the animations like this: a { /* Some basic styling here */ animation: splash 1s normal forwards ease-in-out; } a:hover { animation: hover 1s infinite alternate

Running code after an AngularJS animation has completed

社会主义新天地 提交于 2019-11-28 04:23:21
I have an element whose visibility is toggled by ng-show . I'm also using CSS animations - the automatic ones from ng-animate - on this element to animate its entry. The element will either contain an image or a video. In the case that the element contains a video, I want to play it, but I don't want to play the video until it's finished animating in. As such, I was wondering if there's an easy way to bind a callback to the end of a CSS animation in AngularJS? The docs reference a doneCallback , but I can't see a way to specify it... One workaround(?) I have thought of is $watch ing element