css-animations

get @keyframe current value in css3 with javascript

巧了我就是萌 提交于 2019-12-06 07:16:50
问题 See the demo here: http://jsfiddle.net/hamidrezabstn/fgcPa/5/ When I click on the middle raindrop , I would like it to rotate to the current position of the spinning circle! I tried below the JS code but it doesn't work! The next thing I want to do is the raindrop rotate with spining circle! $(function() { $('#center').click(function() { var pos = $('#circle').css('transform') $(this).css('transform', 'pos') }); }); 回答1: EDITED: I said that it is not posible to get the current status of the

Not able to spin the cog based on the centre origin

我只是一个虾纸丫 提交于 2019-12-06 07:04:19
问题 I am trying to make a hover effect which will spin the three different cog svg icon to its respected centre origin. I tried using transform-origin as centre but no luck. Any help would be appreciated. Here is my code below. .cog--middle { transform: rotate(0deg); transition: 0.3s; transform-origin: center center; } svg:hover .cog--middle { transform: rotate(360deg); } <svg width="110px" height="100px" viewBox="0 0 110 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http:/

Pure CSS rotate animation broken while in infinite loop

杀马特。学长 韩版系。学妹 提交于 2019-12-06 05:19:12
问题 It's been a while since I asked a question here. So excuse me if I do anything wrong. I have an issue with CSS animation . I would like my animation to keep repeating it self but without loosing the initial effects . However it seems like there is a bug either in my code or in CSS animation behavior. After it completes first 2 rotate animations (spin, spinback) defined. The loop begins but the new animation is not as same as before. My goal is to create rotate animation on 6 boxes in order ,

Freeze keyframe animation for debugging

旧巷老猫 提交于 2019-12-06 05:09:27
问题 Is it possible to freeze a CSS keyframe animation with developer tools to inspect it? I need to identify animated elements in a keyframe animation. Here is a playground : body{background:#000;} .circle{ position:relative; width:10px;padding-bottom:50px; margin:100px auto; } .circle div { position:absolute; top:0; left:0; width:100%; height:100%; -webkit-animation: rotate 1.5s infinite; -moz-animation: rotate 1.5s infinite; -o-animation: rotate 1.5s infinite; animation: rotate 1.5s infinite;

How to play reverse keyframe animation for hover off?

梦想的初衷 提交于 2019-12-06 05:01:27
I'm trying to build a dropdown menu where first the dropdown slides down, then one-by-one menu items appear from the bottom. On hover, it looks good but I don't know how to play it smoothly on hover off. What I'm trying to do is hide the second sub-menu item first, then the first submenu item, then the dropdown slides up. What I tried is to add the hide animation keyframes with a delay by default to the dropdown, and add the show animation on hover with 0 delay. But its not working properly as you can see.(and it will animate on page load too, which is not good for me) ul li ul { -webkit

How to fade out element using ng-hide with AngularJS?

删除回忆录丶 提交于 2019-12-06 04:33:11
I can currently show/hide an element according to a boolean condition in my controller. How can I fade the element out if the condition is true instead of just instantly hiding it? <div id='conversion-image' ng-hide="pages.length > 0"> generating pages... <br /> <img src='Images/ajax-loader-blue.gif' /> </div> I also already have the ngAnimate dependancy included as well. var app = angular.module("app", ["ngAnimate"]); You can do it with CSS and ng-animate as the following: .fade-out.ng-hide { opacity: 0; } .fade-out.ng-hide-add, .fade-out.ng-hide-remove { transition: all linear 0.5s; } .check

How to add a *progressive* animation delay based on n-th position?

我的梦境 提交于 2019-12-06 04:30:21
I'd like to animate a list of items. The first should animate with 0ms delay, the second should do the same animation with 50ms delay, third with 100ms delay and so on. The list is dynamic so I won't know the length. Is this possible? Note: I don't need help with animations / keyframes specifically, but how to use nth-child or nth-of-type (or anything else?) to achieve a progressive animation delay based on relative position between siblings. I'm using React / SASS / Webpack if that helps. I can use jQuery if necessary but I'd rather avoid it if possible. Here's an example on how to do

Stop infinite CSS3 animation and smoothly revert to initial state

◇◆丶佛笑我妖孽 提交于 2019-12-06 04:13:08
问题 Having some trouble building a CSS3 loader using keyframe animations. The loader consists of 4 boxes that animate going up and down. The issue I'm having is that when the animation is supposed to stop, the boxes jump to the initial position. The behaviour I'm looking for is: loader is animating infinitely until loading is done, at which point it should animate to the initial position and stop, sort of like having animation-iteration-count: infinite and changing it to animation-iteration-count

ngAnimate CSS animation not working with ng-show & ng-hide

放肆的年华 提交于 2019-12-06 03:17:31
DEMO: http://plnkr.co/edit/cPDUWO?p=preview I have 2 checked checkboxes and 2 widgets displayed on the page. Clicking the checkboxes will use ng-show & ng-hide to hide and show the corresponding widget. Now I want to also have a basic fadeIn and fadeOut , however no luck so far :( The widgets that show/hide without any fade animation. Can you see where I'm going wrong? Controller animateApp.controller('mainController', function($scope) { $scope.pageClass = 'page-home'; $scope.widget_manage_quotes = true; $scope.widget_manage_customer = true; }); CSS .reveal-animation.ng-enter { -webkit

Activate css animation/translation with javascript

依然范特西╮ 提交于 2019-12-06 02:05:09
I am trying to get off javascript animations and use CSS animations instead. I am currently using jQuery's animation functionality. I came across this website with a bunch of wonderful css animations. Such as: .demo1 { -webkit-transition:all .5s ease-out; -moz-transition:all .5s ease-out; -ms-transition:all .5s ease-out; -o-transition:all .5s ease-out; transition:all .5s ease-out; } .demo1:hover { -webkit-transform:translate(0px,10px); -moz-transform:translate(0px,-10px); -ms-transform:translate(0px,-10px); -o-transform:translate(0px,10px); transform:translate(0px,-10px); } What I can't figure