css-transforms

CSS3 3D Transform doesn't work on IE11

大兔子大兔子 提交于 2019-11-27 15:32:19
I'm trying to build a cube with CSS3 3D Transform.. For this example I have only 2 faces : <section id="header-cube-container"> <div id="header-cube"> <figure></figure> <figure></figure> </div> </section> With every other browser I get a good result, but it's weird with IE 11. I have a good 3D translate and rotate on the green face (1), but the red face (2) perpendicular doesn't display in 3D. It's only the projection of the red face on the green face. You can see the result on this fiddle . PS : I make a rotation of 100deg and not 90 to see the projection of the red face on the green face (if

Make CSS3 triangle with linear gradient

 ̄綄美尐妖づ 提交于 2019-11-27 15:16:26
I need to create button with triangle on one side (like this http://css-tricks.com/triangle-breadcrumbs/ ) with linear vertical gradient and border, and I want to use pure CSS3. It's ok if I need 45deg "triangle", I just write smth like this .button:after { -webkit-transform: rotate(45deg); background: -webkit-linear-gradient(-45deg, #fff, #000); content: ''; width: 2em; height: 2em; display: block; } and hide half of that pseudo-element under .button (so only another half of it is visible, like a triangle). But if I need another angle (e.g. more steep) - I can't make it with standart XY

How to get screen position of CSS3-3d transformed elements?

梦想的初衷 提交于 2019-11-27 14:47:27
问题 I have a very complicated site built on CSS3 that has html elements 3d-transformed, rotated, flipped, flopped and just generally distorted. I'm trying to figure out the on-screen location of one of these elements and don't see any way to do so. I was wondering if anyone has any ingenious ideas. Alternatively, if anyone can explain the math behind -webkit-perspective , I can figure out the position as that's the only thing I'm not sure how to model. 回答1: Have you tried using

How to match 3D perspective of real photo and object in CSS3 3D transforms

为君一笑 提交于 2019-11-27 14:16:35
问题 The situation: In my particular case I have 3D photoframe image and a 2D photo. And I want the 2D photo to match the 3D frame using CSS3 transform functions (Rotate, Scale, Skew). The problem: I wasn't able to precisely match the two using manual method aka typing rotation value and watching what it does. Ideal solution #1 Online visual tool exists that lets you drag corners of the photo (like photoshop does) and It gives you the correct CSS3 transform values. Ideal solution #2 Non-visual

CSS3 transform order matters: rightmost operation first

[亡魂溺海] 提交于 2019-11-27 12:44:00
When we use CSS3 transform: operation1(...) operation2(...) , which one is done first? The first operation done seems to be the one the most on the right. , i.e. here operation2 is done before operation1 . Just to be sure, is it true? Note: I have read one thing and its contrary in some places (answers, articles on the internet), thus the question here. Basj Yes, the first operation done is the one the most on the right., i.e. here operation2 is done before operation1 . Here is the documentation : http://www.w3.org/TR/css-transforms-1/ but I haven't found the paragraph about this yet. Example

CSS3 Translate across an Arc

Deadly 提交于 2019-11-27 11:30:04
问题 Is it at all possible with current CSS3 to translate an object (specifically a DIV) along an arc or curve? Here's an image to help illustrate. 回答1: You can use nested elements and make the wrapper and inner element rotate in opposite directions so that the rotation of the inner element compensates for the rotation of the wrapper. If you don't need to keep the nested element horizontal, you can omit the inner rotation. Here is a Dabblet. Stack Snippet: /* Arc movement */ .wrapper { width:

100% height block with vertical text

喜你入骨 提交于 2019-11-27 10:58:01
问题 I have a block of a variable height in which I want to put another block with 100% height and vertical text (bottom-to-top direction) and stack it to the left side of the outer block. Is there a way to achieve it with CSS transforms but without width and height calculations in JS? This is what I could get so far: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <style type="text

Backface-Visibility Not Working Properly in Firefox (Works in Safari)

给你一囗甜甜゛ 提交于 2019-11-27 09:25:05
I'm having a problem with the back face-visibilty property. It works how I want it to in Safari/Chrome, but for some reason it's not working correctly in Firefox. When the box flips, I get a mirror image of the front face. This bug has been acknowledged by Mozilla . The fix is to add transform: rotateX(0deg) to the front and back objects. Adding backface-visiblity:hidden on the container, as suggested by @yalia, makes the back unresponsive in Chrome, hence that fix should be avoided. Here's a fiddle with the fix. Try putting 'backface-visibility:hidden' both on the object and its container.

How can I use CSS3 transform on a span?

孤街醉人 提交于 2019-11-27 09:24:28
I have a inline element (a <span> ) nested in a <h1> tag. I applied a transform property to the h1 ( skew so it looks like a parallelogram). I need to transform the span tag to "unskew" it and its text. But this only seems to work in IE. Here is an example of the HTML and CSS: h1 { background: #f00; padding: .25em .5em; text-align: right; transform: skew(-15deg); } h1 span { color: #fff; transform: skew(15deg); } <h1><span>This is a Title</span></h1> Explanation: A <span> is an inline elements and Transform property doesn't apply on inline elements . List of transformable elements on the CSS

CSS3 animation not working in IE9

耗尽温柔 提交于 2019-11-27 05:58:44
问题 CSS3 animations are not working in IE9. Here is the jfiddle link. Is it possible to make them working on IE or i am making some silly mistake? Here is the code which is not working: @-ms-keyframes rotating { 0% { -ms-transform: rotate(0deg); } 100% { -ms-transform: rotate(360deg); } } #rotateMe{ -ms-animation: rotating 5s linear infinite; } As IE doent support this functionality i have created the fallback using jquery rotate plugin here is my fallback function for IE: $(function() { if (!$