css-transitions

CSS Fade Between Background Images on Hover

假装没事ソ 提交于 2019-11-28 12:13:08
Is there a way that I can do the following? I have a transparent png sprite that shows a standard picture on the left, and a picture for the :hover state on the right. Is there a way that I can have the image fade from the left image into the right image on :hover using only css3 transitions? I've tried the following, but it doesn't work: li{-webkit-transition:all 0.5s linear; -moz-transition:all 0.5s linear; -o-transition:all 0.5s linear; transition:all 0.5s linear;} li{background:url(/img/sprites.png) 0 -50px no-repeat;} li:hover{background:url(/img/sprites.png) 0 -150px no-repeat;} Now, the

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

浪子不回头ぞ 提交于 2019-11-28 10:53:42
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 normal, how can I make it ease out of the blur? Also, is there a way to show text when the mouse

CSS3 transition event Listener with jQuery

余生长醉 提交于 2019-11-28 09:10:56
I am implementing a CSS3 transition effect on a article element but the event listener transitionend works only in pure JavaScript, not with jQuery. See example below: // this works this.parentNode.addEventListener( 'transitionend', function() {alert("1"); }, true); // this does not work $(this).parent().addEventListener( 'transitionend', function() {alert("1"); }, true); Can somebody explain me what am I doing wrong? in jQuery you should use bind() or on() method: $(this).parent().bind( 'transitionend', function() {alert("1"); }); graygilmore Also take note that if you are running multiple

Firefox: Transition placeholder opacity

社会主义新天地 提交于 2019-11-28 09:08:07
问题 I wanted to make input placeholder fade smoothly on focus using transition, but can't get it to work in FF. <input type="text" placeholder="some cool text"/> input:focus::-moz-placeholder { opacity: 0.1; } input::-moz-placeholder { opacity: 1; transition: opacity 1s; } input::-moz-placeholder { opacity: 1; } input:focus::-webkit-input-placeholder { opacity: 0.1; } Fiddle Works fine in Chrome, but not in FF. The placeholder changes opacity on focus as intended, but 1s transition doesn't appear

Width transitioning from fixed size to “auto” using CSS without Javascript

杀马特。学长 韩版系。学妹 提交于 2019-11-28 08:48:39
问题 I'm having a bit of a problem making script-less CSS-only animated transition of an element that's initially set to a fixed width and should expand on mouse over to auto width according to content in it. When mouse goes out it should collapse back to fixed width. Let's say I have a menu: <menu> <li>Item</li> <li>Item with long text</li> </menu> Initially it would display as a collapsed 50px wide vertical bar with icons only. When one mouses over it reveals icon labels. This is a simplified

Image moves on hover when changing filter in chrome

心不动则不痛 提交于 2019-11-28 08:22:10
I have an image, when i blur it on hover, it slightly moves, it's like the image shakes in its position, problem only occurs in chrome ( tested with: chromium 63 linux-x86_64 ), .item img{ transition: 250ms all ease-in-out; -webkit-backface-visibility: hidden; backface-visibility: hidden; } .item:hover img{ filter: blur(2px) } I thaught it might be related to this issue , but none of the solutions worked. UPDATE : As @Chase said , this is a chrome bug and the most stable solution is to wait for it to be fixed. but for now, the best solution for this issue is @kosh Very's answer This is a

What is the right combination of prefixes for CSS transitions and transforms?

夙愿已清 提交于 2019-11-28 08:14:58
What would be the right way to prefix this CSS in order to cover the widest range of browsers and versions? Version 1: -webkit-transition: -webkit-transform .3s ease-in-out; -moz-transition: -moz-transform .3s ease-in-out; -ms-transition: -ms-transform .3s ease-in-out; -o-transition: -o-transform .3s ease-in-out; transition: transform .3s ease-in-out; -webkit-transform: rotateX(-30deg); -moz-transform: rotateX(-30deg); -ms-transform: rotateX(-30deg); -o-transform: rotateX(-30deg); transform: rotateX(-30deg); Or version 2: -webkit-transition: transform .3s ease-in-out; -moz-transition:

CSS transitions mixing absolute and relative positioning

寵の児 提交于 2019-11-28 08:06:24
Short and sweet version: Is it possible to combine position: relative and position: absolute with smooth CSS-transitions? Verbose version: I'm creating a small widget (I call it a Deck), which I wan't to be able to have a collapsed and expanded state. All well so far, this is working fine. Switching between the two states, naturally warrants a transition animation. This is working too, but not the way I would like it to be realized. What I would like to do, is use CSS-transitioning, instead of using absolute positioning using JavaScript, like I am now. Alas, the current scenario is, in

CSS Transition - Fade Element on Hover only

筅森魡賤 提交于 2019-11-28 08:02:38
问题 Is it possible to have a css transition that fades an element in on hover but simply hides the element when the mouse leaves. i.e. hover in = fade for 0.5 seconds | hover out = no fade and instant 回答1: Yes, you can achieve this using CSS3 transitions. Essentially, your CSS should look like this: #myLink { opacity: 0; } #myLink:hover { opacity: 1; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in

CSS transitions: Strange unwanted delay in Webkit browsers (Chrome and Safari)

拥有回忆 提交于 2019-11-28 07:55:11
问题 I was hoping someone could help explain the strange behaviour I'm experiencing in Webkit browsers with unwanted delays in CSS transitions. Here is a link to the page I'm working on: http://demo.daised.com/help-me The desired outcome is for the menu bar to shrink as the user scrolls down the page. This animates perfectly in Firefox. However, in Webkit browsers the transition for font-size of the nav items is delayed by 6(!) seconds. Thanks for helping me understand this better. 回答1: