css-transitions

Combination of animation and transition not working properly

回眸只為那壹抹淺笑 提交于 2019-11-27 05:20:40
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 { background-color: #ccc; height: 100px; width: 100px; transition-property: top, left; transition-duration: 1s;

Webkit support for gradient transitions

半腔热情 提交于 2019-11-27 04:57:43
Im wondering if anyone know when will webkit support transitions of gradients? for example, the following code doesnt work in Chrome 6 (assuming grad-transition is a link): .grad-transition { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(white), to(black)); -webkit-transition: background-image .5s; } .grad-transition:hover { background-image: -webkit-gradient(linear, 0 0, 0 100%, from(black), to(white)); } Trying to do the same thing. As of right now I do not think it is possible to animate a gradient. I'm using a workaround. Instead of animating the gradient, I'm using a semi

CSS transition auto width

北慕城南 提交于 2019-11-27 04:51:11
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-family: Ionicons; font-size: 80%; } <link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"

CSS3 transition of background-image for Firefox not working

亡梦爱人 提交于 2019-11-27 04:51:11
问题 My background-image transition is working fine in Chrome, but does nothing in Firefox. I am new to CSS3 transitions. Did research and my syntax seems to be correct. From what I have read FF should support this. I am on FF 12.0. How come this CSS3 transition does not work in Firefox. No javascript. No workarounds. Just an explanation of why this is failing would be wonderful. http://jsfiddle.net/VCdGt/3/ a.call_to_action { text-decoration: none; display: block; color: #232744; font-size: 20px;

Less CSS: Mixins with Variable Number of Arguments

雨燕双飞 提交于 2019-11-27 04:29:40
LESS allows parametric mixins, such as: .transition(@property, @duration){ transition: @property @duration; -moz-transition: @property @duration; /* Firefox 4 */ -webkit-transition: @property @duration; /* Safari and Chrome */ -o-transition: @property @duration; /* Opera */ } However, this doesn't always work with properties such as transitions. If you are trying to have multiple transitions and attempt to call the mixin multiple times, the last mixin overrides all previously defined transitions. That's because the proper CSS3 syntax for defining multiple transitions is: ... { transition:

CSS transitions with calc() do not work in IE10+

落爺英雄遲暮 提交于 2019-11-27 04:20:37
I am animating a container on mouseover from right to the left with CSS transitions. This works fine in all browsers except Internet Explorer. The reason is that I am using (and need to use) calc() in my CSS left property. I created a live demo here: Live Demo The CSS looks like this: div { background: red; width: 100px; height: 100px; position: absolute; top: 100px; left: 90%; -webkit-transition: left 0.7s cubic-bezier(0.77, 0, 0.175, 1); -moz-transition: left 0.7s cubic-bezier(0.77, 0, 0.175, 1); -o-transition: left 0.7s cubic-bezier(0.77, 0, 0.175, 1); transition: left 0.7s cubic-bezier(0

overflow:hidden ignored with border-radius and CSS transforms (webkit only)

不羁岁月 提交于 2019-11-27 04:18:25
问题 I want to have a square image inside a circle. When the user hovers over the image, the image should scale (zoom in). The circle should remain the same size. Only during the CSS transition, the square image overlaps the circle (as if overflow:hidden weren't there at all). Here's a demo with the weird behavior in Chrome and Safari: http://codepen.io/jshawl/full/flbau Working ok in firefox. 回答1: I removed some superfluous markup (the circle and square containers... only needs one) and styled

Animate an element's width from 0 to 100%, with it and it's wrapper being only as wide as they need to be, without a pre-set width, in CSS3 or jQuery

江枫思渺然 提交于 2019-11-27 04:03:06
问题 http://jsfiddle.net/nicktheandroid/tVHYg/ When hovering .wrapper , it's child element .contents should animate from 0px to it's natural width. Then when the mouse is removed from .wrapper , it should animate back down to 0px . The .wrapper element should only be as wide as it needs to be (allowing .contents to grow), so .wrapper should grow in width and shrink in width as .contents does. There should be no set width for .contents . I'm using CSS3, but it could be accomplished in jQuery, that

CSS Transition - eases in but doesn't ease out?

泪湿孤枕 提交于 2019-11-27 03:52:16
问题 I have a wee problem concerning my images, as shown here (http://jsfiddle.net/garethweaver/Y4Buy/1/). .img-blur:hover { -webkit-filter: blur(4px); transition: all 0.35s ease-in-out; -moz-transition: all 0.35s ease-in-out; -webkit-transition: all 0.35s ease-in-out; -o-transition: all 0.35s ease-in-out; -ms-transition: all 0.35s ease-in-out; } <img src="http://i.imgur.com/Vp5StNs.png" class="img-blur"> The image blurs when the mouse hovers but when I take my mouse off it goes straight back to

Font-Weight CSS Transition in Chrome

二次信任 提交于 2019-11-27 03:09:28
问题 Trying to get font-weight to gracefully transition from '400' to '600' using CSS but it doesn't appear to be working in Chrome. Is this a known bug or am I doing something wrong? Check the Fiddle here for an example 回答1: The problem is that font weights, when represented numerically, must be a multiple of 100. To animate between 400 and 600, the font would change from 400 to 500 to 600 (3 'frames', if you like) and wouldn't look very smooth. An animation wouldn't increment the weight by 1