css-transitions

css3: two transitions with different timing functions (css3)

与世无争的帅哥 提交于 2019-11-28 01:48:02
问题 I want to use a transform for both scale and translateX , but each with a different timing function. Currently I have it working with absolute positioning instead of translateX , as follows: transition: transform 500ms cubic-bezier(0.390, -0.600, 1.000, -0.600), left 500ms cubic-bezier(0.270, 0.875, 0.575, 0.870); . left: -50px ; transform: scale(2,2) ; How would you rewrite this to achieve the same, but use translateX instead of left ? 回答1: In this case, I would probably use a wrapper and

how to listen to the end of a bootstrap animation

蹲街弑〆低调 提交于 2019-11-28 00:57:31
问题 I'm developing a website using bootstrap and its responsive JS+CSS. At the top of the page I have a fixed navigation bar where an "expand menu" button is shown in case the viewport is too tight. This button does its magic with an animation (a CSS3 one I think) and I'm happy with it, but I would like to do something more (toggle classes with jquery) each time the animation finishes (both the open animation and the close one). I was thinking about a javascript listener (even better by defining

IE11 triggers css transition on page load when non-applied media query exists

拥有回忆 提交于 2019-11-27 21:44:08
问题 I have a situation which only occurs on IE11. Chrome, Firefox, Safari (tablet and phone) all work as expected. I have created a transition for a panel(DIV) that slides in/out from the side. On pageload it should NOT "animate" but snap into the appropriate position. But on IE11 when the page loads the transition is "played" ONLY if there is a media query involved with that element matching the highest level of CSS specificity for the selector. The strange thing is that the media query is not

backside-visibility not working in IE10 - works fine in webkit

情到浓时终转凉″ 提交于 2019-11-27 21:41:37
I'm building a simple pure-css 'card flip' animation, it has to work in IE10, but sadly what I've written doesn't. jsFiddle demo here or sample html zip here I can see that backside-visibility works in IE10 from their demo here so maybe I've just overlooked something stupid, maybe a fresh pair of eyes might help! Thanks in advance! Well some Microsoft IE devs saw my tweet and jumped in with a fix already! Apparently IE10 does not support preserve-3d, and they whipped up this jsFiddle demonstration Big thanks to @reybango and @sgalineau for the help - very much appreciated. redochka This seems

Transition background-color via slide up animation

丶灬走出姿态 提交于 2019-11-27 21:16:26
I am trying to change the background-color of an element on hover by using CSS transitions. I want to do this by having it scroll up from the bottom. I can fade the background in using this, but I would like it to slide up: -webkit-transition: background-color 0.5s linear; -moz-transition: background-color 0.5s linear; -o-transition: background-color 0.5s linear; transition: background-color 0.5s linear; One other thought, would it be better to scroll up a separate element with the background applied to it? In order to slide the background color up you would need to use a background image, or

Is it possible to transition text-alignment using CSS3 only?

最后都变了- 提交于 2019-11-27 20:37:01
Is it possible to transition text-alignment using css3? For example, I'd like to animate text-alignment from left to right, however, adding a transition property on text-align doesn't do the trick. http://codepen.io/anon/full/lGDwB Christoph Bühler I found out a way of not only animating from left to right / right to left, but also from centered text. The trick is to apply a width of '0'. ul { background: #fff; padding: 16px; border: 1px solid #e2e2e2; } li { list-style: none; letter-spacing: 1px; font: 12px 'Tahoma'; line-height: 24px; color: #444; text-align: center; white-space: nowrap;

Can CSS3 transition font size?

你。 提交于 2019-11-27 20:23:11
问题 How can one make the font size grow bigger on mouse over? Color transitions work fine over time, but the font size switches immediately for some reason. Sample code: body p { font-size: 12px; color: #0F9; transition:font-size 12s; -moz-transition:font-size 12s; /* Firefox 4 */ -webkit-transition:font-size 12s; /* Safari and Chrome */ -o-transition:font-size 12s; transition:color 12s; -moz-transition:color 12s; /* Firefox 4 */ -webkit-transition:color 12s; /* Safari and Chrome */ -o-transition

CSS transition from `display: none` on class change?

ⅰ亾dé卋堺 提交于 2019-11-27 20:21:38
I've started using transitions to "modernise" the feel of a site. So far, :hover transitions are working great. Now I'm wondering if it's possible to trigger a transition based on other things, such as when a class changes. Here's the relevant CSS: #myelem { opacity: 0; display: none; transition: opacity 0.4s ease-in, display 0.4s step-end; -ms-transition: opacity 0.4s ease-in, display 0.4s step-end; -moz-transition: opacity 0.4s ease-in, display 0.4s step-end; -webkit-transition: opacity 0.4s ease-in, display 0.4s step-end; } #myelem.show { display: block; opacity: 1; transition: opacity 0.4s

CSS3 transform rotate causing 1px shift in Chrome

人走茶凉 提交于 2019-11-27 19:14:13
I'm having an issue in chrome with a css3 transform rotate transition. The transition is working fine but just after it finishes the element shifts by a pixel. The other strange thing is that it only happens when the page is centered ( margin:0 auto; ). The bug is still there if you remove the transition as well. You can see it happening here: http://jsfiddle.net/MfUMd/1/ HTML: <div class="wrap"> <img src="https://github.com/favicon.ico" class="target" alt="img"/> </div> <div class="wrap"> <div class="block"></div> </div> CSS: .wrap { margin:50px auto; width: 100px; } .block { width:30px;

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

被刻印的时光 ゝ 提交于 2019-11-27 18:34:55
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. Aaron K I removed some superfluous markup (the circle and square containers... only needs one) and styled the img itself: #wrapper { width: 500px; height: 500px; border-radius: 50%; overflow: hidden; -webkit