css-transforms

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

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;

CSS Transform with element resizing

你说的曾经没有我的故事 提交于 2019-11-27 18:56:46
I found this: width/height after transform and several others, but nothing is not quite what I'm looking for. What I want is to scale something to 50% of it's size (with nice animated transition of course) and have the page layout re-adjust to the new (visual) size of the element. What seems to happen by default is that the element still retains it's original size in the layout structure, and is merely drawn with the associated transformations. Basically I want the user to click on a block of text (or other content), and then scale that text to 50% (or whatever) of it's size and stick it in a

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

css3 transform reverts position: fixed

陌路散爱 提交于 2019-11-27 17:15:18
问题 When using a css3 transform() , position: fixed does not apply. I made a fully working jsFiddle showing the issue: http://jsfiddle.net/SR5ka/ First scroll down, notice the left-hand sidebar stays fixed. Now, click expand , and scroll down, notice the left-hand sidebar is now not fixed. Any idea if there is a native css fix for this? 回答1: You could use a work around like this one. It involves toggling a left value (via a class) for both the fixed element and the container. .global-wrapper {

Unskewing the ends of an assortment multiple skewed images

99封情书 提交于 2019-11-27 16:29:07
I asked this question earlier asking how to skew an assortment of images. I was able to get very satisfying results CSS .container { font-size:0; height:215px; margin: 30px 50px; text-align: center; color: black; } .box1 { font-size:initial; width:calc(100% / 6); height:100%; border: 3px solid; box-sizing:border-box; transform: skew(-25deg); position: relative; overflow: hidden; display:inline-block; } .box2 { font-size:initial; width:calc(100% / 6); height:100%; border: 2.5px solid; box-sizing:border-box; transform: skew(-25deg); position: relative; overflow: hidden; display:inline-block; }

Why transitions for some CSS properties are slow and none fluent

▼魔方 西西 提交于 2019-11-27 16:12:01
问题 I spent a bout 4 hours on having a simple transition with an acceptable performance: First I tried this code : left: 2000px; -webkit-transition: left 1s linear; -moz-transition: left 1s linear; -ms-transition: left 1s linear; The result was terrible on Chrome v21.0.1180.89 and FireFox v15.0.1, but was great on IE10. I captured the CPU usage and GPU usage graph and found that chrome does not use GPU for basic css properties, What is the solution for modern-browsers? 回答1: Don't use left or top,

Extend the final state of the first animation for translated element

为君一笑 提交于 2019-11-27 16:09:22
I know this is asked multiple times here, but I am asking for a different approach for these kind of animations. Problem: The 2nd box has multiple animations, trying to create the same effect as 1st one. It seems like the transform property is getting overwritten (as it should)* . I am trying to extend the 1st animation (of 2nd box) with the properties of 2nd animation. Tried to use animation-fill-mode: forwards but with no success. Maybe I am missing something basic. Is it possible with vanilla CSS? * Reference The ‘animation-name’ property defines a list of animations that apply. If multiple

How to transform each side of a shape separately?

一笑奈何 提交于 2019-11-27 15:53:42
How do I create a CSS shape in which each side is transformed separately. Something like the shape in the below image. Is that possible using CSS only without images? I don't think there is any way in CSS to pick and transform each side separately but you can achieve the shape in question by using perspective transforms (pure CSS). Rotating the element with perspective along both X and Y axes sort of produces the effect of each side having a separate transformation. You can adjust the angles and the perspective setting to create the shape exactly as required. .shape { background: black; margin

How should you prefix transform properties in CSS3 animations?

北慕城南 提交于 2019-11-27 15:52:11
I have the following snippet of Sass that works like a charm, but I wonder if I need to prefix my transform properties, and, if so, how? (if not, why not?) @mixin expand-o-band() { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(2); } } @-webkit-keyframes expand-o-band { @include expand-o-band(); } @-moz-keyframes expand-o-band { @include expand-o-band(); } @-o-keyframes expand-o-band { @include expand-o-band(); } @keyframes expand-o-band { @include expand-o-band(); } .circle-thing { -webkit-animation: expand-o-band 1.5s infinite; /* Safari 4+ */ -moz-animation: