css-transitions

CSS Animation/Scale issue in Chrome/Webkit

倖福魔咒の 提交于 2019-11-30 17:39:20
问题 This effect works fine in FF but not Chrome- the Firebug results in Chrome show that the '-webkit-animation' aren't rendered in Chrome. In Firefox however, you see the'stretch' effect on entrance of the object. In Chrome, the object doesn't scale at all. http://jsfiddle.net/AfDwu/5/ 回答1: You are not specifying the properties of the -webkit-animation , only the name. Replace: -webkit-animation-name: ooze With: -webkit-animation: ooze 2s 2s ease-in-out; And it will work 来源: https:/

How do you make Placeholder and Label Transitions?

杀马特。学长 韩版系。学妹 提交于 2019-11-30 16:41:13
I am looking to find an example of how to make a label / placeholder transition move up and out of placeholder position into a label position and vice versa.. Example: https://www.xero.com/us/signup/ General sibling selectors & :focus does the trick in a very simple way ;) input{ position:absolute; top:20px; } input ~ span{ transition:top .7s ease; position:absolute; top:20px; } input:focus ~ span{ top:0px; } <label> <input> <span>Text</span> </label> here is an example with multiple fields https://jsfiddle.net/shLe3107/1/ hope this is enough else just ask I found a good Codepen showing an

Animating an element when hovering on two other element using css

最后都变了- 提交于 2019-11-30 15:39:10
问题 i am trying to animate a div when hovering on another div. Ihave following code html <div> </div> <div class="content"> </div> css div { height: 100px; width: 100px; background: red; transition: all 0.4s ease-in-out; } .content { height: 20px; width: 20px; background: green; display: none; } div:hover + .content{ display: block; margin-top: -100px; margin-left: 50px; } What i am trying to do is, i need to animate .content to margin-top: -100px and margin-left: 50px; from its default position,

Continuous CSS transitions

丶灬走出姿态 提交于 2019-11-30 15:04:39
Is there a way to continuously animate a background image's background-position property using CSS3 transitions? Yes, it's possible - DEMO div { background: url(http://lorempixel.com/100/100); height: 100px; width: 100px; -webkit-animation: slide 2s linear infinite; -moz-animation: slide 2s linear infinite; animation: slide 2s linear infinite; } @-webkit-keyframes slide { 0% {background-position: 0 0;} 100% {background-position: 100px 0;} }​ @-moz-keyframes slide { 0% {background-position: 0 0;} 100% {background-position: 100px 0;} } @keyframes slide { 0% {background-position: 0 0;} 100%

Angularjs ng-animate + css transition for sliding effect

▼魔方 西西 提交于 2019-11-30 14:19:01
I'm trying to achieve sliding effect with the new ng-animate feature of Angular. I've taken some code from the demo site and have prepared a fiddle . The problem is that elements below the sliding DIV keeps shifting up and down when the item is being swapped from the array. I tried with line-height but no success. Is it possible to fix the above behavior? or any better way to achieve it only with angular and CSS? You can wrap the input and the button in a div and also put it in the absolute position. Here is a demo HTML <div ng-app=""> <div ng-controller='anim' > <div ng-repeat="item in lst"

Why is Ember.run afterRender not working for CSS transitions?

﹥>﹥吖頭↗ 提交于 2019-11-30 13:19:17
From my understanding, one way to work with CSS transitions is to use Ember.run.scheduleOnce('afterRender') However, for me it is not working without adding a timeout. This is in Ember 1.0.0 View = Em.View.extend({ didInsertElement: function() { Ember.run.scheduleOnce('afterRender', this, 'animateModalOpen'); }, animateModalOpen: function() { // this does not work - modal gets styles from class "in" with no transition $('.modal').addClass('in'); // this does work, the transition is fired setTimeout(function() { $('.modal').addClass('in'); }, 1); } }, }); Is this something that used to work and

How to animate an element on hover

倖福魔咒の 提交于 2019-11-30 13:08:34
How can I make my <div> elements grow (and the content changes text size to a higher one), when hovered over? I put them in a class and tried: size: 150%; and height: +30px; width: +30px; the first try didn't work at all, and the second code just made the div's flash and dissappear partially. laymanje CSS3 solution: div { background: #999; width: 200px; height: 20px; transition: width 1s; } div:hover{ width: 300px; } <div> <p>Im content</p> </div> http://jsfiddle.net/MrdvW/ Using CSS you can add a hover style to the div: div.container { width: 80%; background-color: blue; } div.container:hover

Cubic bezier curves - get Y for given X

对着背影说爱祢 提交于 2019-11-30 12:15:19
I have a cubic bezier curve where the first and last points are given (namely P0(0,0) and P3(1,1)). The other two points are defined like this: cubic-bezier(0.25, 0.1, 0.25, 1.0) (X1, Y1, X2, Y2, also those values must not be smaller or larger than 0 or 1, respectively) Now what would I have to do to get the Y coordinate for a given X, assuming there's only one? (I know that under certain circumstances there can be multiple values, but let's just put them aside. I'm not doing rocket science over here, I just want to be able to get Y multiple times per second to do transitions) I managed to dig

iOS Safari + CSS calc() + CSS transition = Instant Crash

痴心易碎 提交于 2019-11-30 11:53:11
问题 When I try to use left: -webkit-calc(100% - 100px); (assuming that left: 0; is initial state) it works in iOS 6.0.1 just fine. But when I do the same with transition: left 1s linear; it instantly crashes Safari, every single time. Is it known bug or am I doing something wrong? It also doesn't work in Safari 5 (no reaction). But it works in Firefox and Chrome. 回答1: You can fix this by initialising the property with anything but auto: .menu { left: 0; transition: left 1s linear; } .menu-open

CSS3 Transition: Different transition for *IN* and *OUT* (or returning from transitioned state)

霸气de小男生 提交于 2019-11-30 11:46:31
Original Question... updated working code below: I have a loading image which comes up during an ajax load event. The image shows/hides by adding or removing a "loading" class to the body element. Currently, the loading image animates background-size from 0 to 100%, and fades in the opacity (vice versa for the 'return' transition). What I want to accomplish, though, is to have the background-size transition happen instantly (not transition) on the fade out, so: Fade in: opacity from 0 to 1 in .2s, background size from 0 to 100% in .2s Fade out: opacity from 1 to 0 in .2s, background size from