css-transitions

css3: two transitions with different timing functions (css3)

烂漫一生 提交于 2019-11-29 08:21:05
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 ? In this case, I would probably use a wrapper and transition one of the two transforms for the wrapper and the other one for the element itself. demo HTML: <div

css transition opacity of the background color

蓝咒 提交于 2019-11-29 07:18:34
问题 looking for clue, how to use the opacity in background color with transition? I'm using rgba() function, but the transition is not working on hover. .bx{ background:rgba(255,0,0,0.5); width:100px; height:100px; position:relative; transition: opacity .5s ease-out; -moz-transition: opacity .5s ease-out; -webkit-transition: opacity .5s ease-out; -o-transition: opacity .5s ease-out; } .bx:hover{ background:rgba(255,0,0,1); } .t{ position:absolute; bottom:0px; } HTML <div class="bx"><div class="t"

how to listen to the end of a bootstrap animation

自闭症网瘾萝莉.ら 提交于 2019-11-29 07:13:18
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 it thanks to jquery .on function), but I really don't know what event I should listen to! Any ideas?

Indicate that processor-heavy JS function is running (GIF spinners don't animate)

不打扰是莪最后的温柔 提交于 2019-11-29 06:21:21
问题 Showing then hiding animated indicator / spinner gifs are a good way to show a user that their action has worked and that something is happening while they wait for their action to complete - for example, if the action requires loading some data from a server(s) via AJAX. My problem is, if the cause of the slowdown is a processor -intensive function, the gif freezes. In most browsers, the GIF stops animating while the processor-hungry function executes . To a user, this looks like something

Font-Weight CSS Transition in Chrome

Deadly 提交于 2019-11-29 03:11:46
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 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 each time (400, 401, 402...) it would increment the weight by 100 (400, 500, 600). If your animation lasted 2

Fill element from center on hover

不羁的心 提交于 2019-11-29 02:57:24
问题 How can I create a button so that on hover the background colour fills the element from center to left and right of the element. Example : I know how to use CSS3 transitions and can get it to animate to the desired shape but can't get it to transition from center outwards. The shape does not change size I just want to fill it using a transition . 回答1: Another way to achieve a similar effect would be to use linear-gradient as the background-image , position the image at the center of the

CSS Transitions with :before and :after pseudo elements

喜你入骨 提交于 2019-11-29 02:52:32
Can't seem to animate pseudo elements with -webkit-transition. The fiddle below shows what I mean when run in Chrome/Safari, I guess this isn't supported right now? http://jsfiddle.net/4rnsx/130/ Fixed in Google Chrome on January 3rd, 2013. By now (I do update this list) it's supported in: FireFox 4.0 and above Chrome 26 and above IE 10 and above Waiting for Safari and Chrome for Android to pull these updates. You can test it yourself in your browser , or See the browser support table . Well, actually, you can. You just need to leverage the often forgotten inherit value. Unfortunately we can't

CSS 3 - transition prefixes - which ones to use?

末鹿安然 提交于 2019-11-29 02:22:30
问题 I have a question regarding the CSS vendor prefixes for transition. This source states that "you need to use all the usual prefixes to make this work in all browsers (-o-, -webkit-, -moz-, -ms-)". That page only shows the -webkit- and -moz- prefixes and claims that IE 10+, FF 16+ and Opera 12.1+ can read the prefix free version. In the code of Twitter Bootstrap, there is always exists a -webkit- , -moz- and -o- prefixed version in addition to the un-prefixed version. What prefixes should I

iOS CSS opacity + visibility transition

。_饼干妹妹 提交于 2019-11-29 02:13:52
Take a look at the following test in a desktop browser ( JSFiddle ): a { background: gray; display: block; margin: 100px; padding: 100px; } a span { opacity: 0; -webkit-transition: 0.5s; visibility: hidden; } a:hover span { opacity: 1; -webkit-transition: 0.5s; visibility: visible; } <a href="#">a <span>span</span></a> You hover over the anchor element and the span element fades in like it should. Now take a look via an iOS device. Result: it does nothing. Facts: If the transition property is absent, it works. If either the opacity or visibility property is absent, it works. There is no

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

谁说胖子不能爱 提交于 2019-11-29 01:48:59
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 even appropriate (should never be applied when the page is loaded in my test) . The following simple