css-transitions

IOS Safari transition transform not working

独自空忆成欢 提交于 2019-12-22 04:54:28
问题 Whenever I seem to apply some code to let's say move a div for example using the latest iOS Safari browser it doesn't actually transition between the two rules set. I have tried changing to use other than percentage values but still to this day, I have never been able to get it to work when I use transition: transform; for any translate property applied. I'm using the correct prefixes and checked support and should be working no problem. http://caniuse.com/#search=transition http://caniuse

translate3d() causing jQuery hover/click events to not fire correctly

可紊 提交于 2019-12-22 04:20:34
问题 When analyzing jQuery mouse events on different CSS Animation types, I'm noticing that translate3d causes hover and other events to not fire correctly. In a basic example, I am animating a list of blocks from right to left. On rollover, I am setting the hovered LI background to GREEN. note: tests are built for webkit HTML <div class="container"> <ul> <li>content</li> <li>content</li> ... </ul> </div> CSS .container{ position: absolute; left: 600px; top: 0; } .container ul{ list-style: none;

Trigger animation on element click in pure CSS

依然范特西╮ 提交于 2019-12-22 02:06:12
问题 Let's say I have a simple element: <a href="#" id="btn" onclick="return false">Click</a> Now I can change the look of this element on click via :active : #btn:active { background: red; } What I'd like however is that the element will stay red for about a second after I clicked it without altering the HTML (so no checkbox hack) or javascript. Is there a smart trick that can be abused for this? JsFiddle here 回答1: Answering my own question. By abusing the :not pseudo class we can trigger an

A “transitionend” event that always fires, and once only

不打扰是莪最后的温柔 提交于 2019-12-22 01:28:51
问题 I need a special transitionend -like event that fires once after all transitions are complete, or fires immediately if there are no transitions defined in the CSS. This what I've come up so far: (function($){ $.event.special.transitionsComplete = { setup: function(data, namespaces, eventHandle){ var queue = [], style = window.getComputedStyle(this, null), computedProps = style.getPropertyValue('transition-property').split(', '), computedDurations = style.getPropertyValue('transition-duration'

CSS3 Transition from normal flow position to absolute

梦想与她 提交于 2019-12-21 18:47:56
问题 I've hit this one a couple of times in the past and never walked away with a good solution. If I have several HTML elements that are positioned according to natural document flow. For the sake of example, let's say it's a simple stack of div s. I would like to use CSS3 transitions to smoothly move one of those elements to a fixed location of the page (say 0,0) and then back to it's normal position. The problem is that changing the position style attribute to absolute or fixed if it wasn't

Fill element with slanted background on hover

 ̄綄美尐妖づ 提交于 2019-12-21 17:24:27
问题 I'm trying to create an CSS button hover effect . But I didn't manage to fill the element with a slanted shape. How the hover effect was planned: Screenshot 1: How it looks actually. Screenshot 2: How I want the hover effect to look like with slanted side. .button_sliding_bg { color: #31302B; background: #FFF; padding: 12px 17px; margin: 25px; font-family: 'OpenSansBold', sans-serif; border: 3px solid #31302B; font-size: 14px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase;

Fixed position misbehaviour in IE11

爷,独闯天下 提交于 2019-12-21 12:14:27
问题 I am experiencing elements position misbehaviour into my page, in IE(11) only; live link here. The logotext, the menu and the left sidebar text, remain in place doesn't move with the wrapper when the left slider is open (clicking on info+ button). I've read about position: fixed + transition in IE problems. I've tried to apply position: expression(fixed); to the header but something went wrong and the wrapper receive a brake-movement at open/closing slider. (The sidebar didn't work with

How to slide in divs from off screen into absolute layout using CSS transitions?

半城伤御伤魂 提交于 2019-12-21 11:24:21
问题 I have a grid of absolutely positioned divs (the grid is made up of differently shaped rectangles that fit together to make a large rectangle). I am trying to animate the display of this grid by having all of the individual rectangles 'fly' into the grid from offscreen. So the rectangles on the left fly in from the left, the ones on the right from the right etc. I am using CSS3 transitions and when flying in from the top or left it works perfectly, I just use negative margins to position them

Hover state is maintained during a transition even if the element has gone

别来无恙 提交于 2019-12-21 07:30:09
问题 Consider a simple element, and its associated CSS: <div id="content">Hover me !</div> #content { width: 100px; height: 100px; } #content:hover { transform: translateY(500px); transition: transform 1s 500ms; } JSFiddle The principle is straightforward: while the element is hovered, it must go down. The problem is, when the mouse doesn't move , that the :hover state is maintained even if the element is not physically below the mouse anymore (due to the translation). The state seems to be

How to transition child when parent goes from display: none to block

情到浓时终转凉″ 提交于 2019-12-21 07:19:10
问题 I'm having trouble creating a flyout menu with a specific effect. The flyout goes from display:none to block and then I use jquery to animate opacity from 0 to 1 (and vice versa). This is necessary because otherwise the transition does not happen when the element has just had it's display property changed. I did not think that this would propagate to children. But inside of my flyout I have 4 columns of links that have an opacity transition, each with it's own delay so they come in one at a