:package: Introduction to CSS 3D transforms

Related tags

Effect 3dtransforms
Overview
Comments
  • Can't seem to have 2 card flips.

    Can't seem to have 2 card flips.

    When I try to create 2 card flips, the first flip works, but the second does not.

    What can be done to enable 2 or more card flips on the same page?

    Thanks very much

    opened by nigef 6
  • transform-origin and Safari

    transform-origin and Safari

    Hello, I am trying to use your code. The only exception is, the front face is at level 0, and the back-face is at level (-cubeWidth)px. In order for it to work, the transform-origin must be put to center center -cubeWidth / 2. However, it seems that management of perspective is totally screwed (in all senses of the term) when transform-origin is changed, under Safari. I created an entry on stackoverflow : http://stackoverflow.com/questions/43536900/transform-origin-and-perspective-with-safari

    It is not a problem on your code stricto sensu, but do you have any idea how to solve this problem, as you are the expert in css 3D transforms?

    Best Regards, Joel

    opened by joelbloch 5
  • Event firing when 3D Transform complete

    Event firing when 3D Transform complete

    Trying to find a way to fire an event via jQuery/JS when the card flip animation is complete, but not having much luck. I have tried the following code:

    $("#card.flipped").one('webkitAnimationEnd oanimationend msAnimationEnd animationend',   
        function(e) { alert('animation over baby') });
    

    and some other variations of it, but nothing is happening. Peeked into your utils.js and I can't make anything happen either.

    What I want to achieve is having a card flip including the button being part of it. Just want to hide the button for the duration of the animation and then make it reappear when animation is over. Obviously putting button on the 'front' and 'back' is not an option. Best to post my example https://rawgit.com/SLQ-web/Packery-Mockup-SLQ-Homepage/Wacky-draggabilly/html/whats-on-flickity.html - check out the "Question of the Day" section to see what I mean (have the complete Packery grid item flip).

    Is there any way to achieve this with your 3D Transform & Packery Libraries?

    opened by coolwebs 4
  • How to get the property translateZ?

    How to get the property translateZ?

    hi:

    Is there any materials which talk about why you choose translateZ(100px) in cube and translateZ(50px) in a box. And when I want do some 3d effects, how can I chose a proper value of translateZ.

    thanks.

    opened by shawnXiao 4
  • Children perspective example doesn't have same vanishing point in Firefox

    Children perspective example doesn't have same vanishing point in Firefox

    In Firefox 11.0a2, the vanishing point in the children example doesn't line up as it should. There must be something I'm missing as other examples have the same vanishing point.

    WebKit and Firefox perspective comparison

    http://desandro.github.com/3dtransforms/examples/perspective-02-children.html

    @louisremi - would you mind taking a look?

    opened by desandro 4
  • Add support for all vendors

    Add support for all vendors

    opened by desandro 3
  • Added IE11 support to the Carousel 2 example

    Added IE11 support to the Carousel 2 example

    Sorry about the other pull request, I fixed the commit. Now it is only going to modify the files that actually changed.

    I added functionality to the Carousel 2 example which allow your carousel to work in IE11. There is still an issue w/ the backface visibility, but if it is toggled off, it works as expected. I tested in IE10, but that did not work at all for me.

    Thanks for your examples.

    opened by 0xbrock 2
  • Error in example code

    Error in example code

    The example code for the box on the page: https://3dtransforms.desandro.com/box

    .box { width: 200px; height: 300px; }

    should be

    .box { width: 300px; height: 200px; } The code on codepen is right, but not in the example code.

    opened by marcusgsta 1
  • Error in explanation

    Error in explanation

    On the page: https://3dtransforms.desandro.com/cube the following sentence:

    "Now all the faces are placed on top of one another, ready to be rotated. .cube__face--left and .cube__face--right will use rotateX() so they are rotated around the vertical X axis."

    should be:

    "Now all the faces are placed on top of one another, ready to be rotated. .cube__face--top and .cube__face--bottom will use rotateX() so they are rotated around the vertical X axis."

    Right?

    opened by marcusgsta 1
  • Replace with Images

    Replace with Images

    Hello,

    The code works fine. I was trying replace the divs with images, as shown below. As a result, the cube looks as expected seemed to flip uunpredictably, coming closer to the user for the front, right, top and bottom, and further back when showing back and left. It seem to take the shortest path and not rest on a single set of axis. Any help would be much appreciated.

    Thanks!

            <!-- <div class="cube__face cube__face--front">front -->
                    <img class="cube__face cube__face--front smaller-image thin-img-border" src='./Image.jpeg' alt="Image">
            <!-- </div>
            <div class="cube__face cube__face--back">back -->
                    <img class="cube__face cube__face--back smaller-image thin-img-border" src='./Image.jpg' alt="Image">
            <!-- </div>
            <div class="cube__face cube__face--right">right -->
                    <img class="cube__face cube__face--right smaller-image thin-img-border" src='./Image.jpg' alt="Image">
            <!-- </div>
            <div class="cube__face cube__face--left">left -->
                    <img class="cube__face cube__face--left smaller-image thin-img-border" src='./Image.jpeg' alt="Image">
            <!-- </div>
            <div class="cube__face cube__face--top">top -->
                    <img class="cube__face cube__face--top smaller-image thin-img-border" src='./Image.jpg' alt="Image">
            <!-- </div>
            <div class="cube__face cube__face--bottom">bottom -->
                    <img class="cube__face cube__face--bottom smaller-image thin-img-border" src='./Image.jpg' alt="Image">
            <!-- </div> -->
        </div>
    
    opened by jakedurell 1
  • js/rotate-box.js

    js/rotate-box.js

    Hello Desandro,

    Much appreciation for your work. I was building my spouse an interactive web page using your unique rotating cube design. But I noticed after a recent update file "https://desandro.github.io/3dtransforms/js/rotate-box.js" no longer exists. I cannot discover the solution to remedy my project even when referencing the repository. Here is an example https://codepen.io/ChaseBoland/pen/odjaxB

    Thank you for the support

    opened by ChaseBoland 1
  • Card Flip Not Working in Safari

    Card Flip Not Working in Safari

    Hi Desandro,

    I love your Card Flip tutorial, and it works great in Chrome and Firefox, but apparently not in Safari. (I'm running Safari 13.1.3).

    In Safari, the backside text always displays in reverse, and when the transition from front to back is complete, the front suddenly becomes visible again (reversed). We can never see the backside unless it's transitioning, and the front is displayed backward when we should be seeing the backside.

    Is there a fix you can suggest?

    Thanks!

    -Mike Screen Shot 2022-09-15 at 8 56 26 AM

    opened by mrwizzer 0
  • backface-visibility in 3D cube

    backface-visibility in 3D cube

    Issue: Applying a cube rounded corners, the content behind is shown.

    What I want: Perform a cube with rounded corners, create the effect, or even better, perform a cube with filled content.

    What I need: To fill the whole content inside the cube, make the cube looks like is filled.

    https://codepen.io/fglez94/pen/WNjBXxd

    opened by fglez94 0
  • Carousel Demo doesn't work in IE11

    Carousel Demo doesn't work in IE11

    I just tried the carousel demo here

    http://desandro.github.io/3dtransforms/examples/carousel-01.html

    in IE 11. Unfortunately, it doesn't seem to work, all the numbers on the panels are backward:

    initial

    And if you click the next/previous buttons, it doesn't rotate the carousel, but rather flips the entire thing as if it were flat:

    rotated

    If you don't have IE 11, I'd be glad to help testing/debugging, but I would need some pointers where to start, as I haven't been doing much with 3d in CSS yet

    opened by flack 7
  • IE10 possible bug

    IE10 possible bug

    From Eric via email

    Using your extremely helpful guide (http://desandro.github.io/3dtransforms/docs/card-flip.html), I was able to build a flashcard study tool for my students, that works on most browsers and tablets. I had largely ignored IE, as my other tools did not work in that browser either, but after some quick workarounds, I was able to solve those problems.

    Unfortunately, I have not been so lucky with your card flip demo. At first, I thought it was something to do with my code, but both of our sets of code perform the same on IE 10:

    1. Card loads fine.
    2. User "flips" the card
    3. The back side flips, but the text is reversed--mirrored--in IE 10.

    Any idea on a work around for this? I tried adding the "-ms" vendor properties to each respective CSS property, but that did not work.

    opened by desandro 5
Owner
David DeSandro
Designer, developer @metafizzy
David DeSandro
Recreation of the background scale hover effect seen on the DDD Hotel website using CSS clip paths.

Background Scale Hover Effect Recreation of the background scale hover effect seen on the DDD Hotel menu using CSS clip paths. Article on Codrops Demo

Codrops 98 Dec 6, 2022
.qube -- The Quintessential Responsive 3D CSS Cube

.qube Quintessential Responsive 3D CSS Cube Created by @zacharyjohnson — zachstronaut.com Hello web friend! The styles defined in "src/qube.css" provi

Zachary Johnson 63 Dec 17, 2022
CSS 3D Dropdown Concept

Makisu An experimental CSS 3D dropdown concept, wrapped up in a jQuery plugin. Check out the demo (you'll need a CSS 3D capable browser, such as Chrom

Justin Windle 1.5k Nov 28, 2022
3D (animated) cube using only CSS (Less), originally used by LeanCloud (aka. AVOS Cloud)

cube.less 3D (animated) cube using only CSS (LESS). Demo See this demo page. There's also a live production site (WIP) using these cubes. Install $ bo

Tunghsiao Liu 54 Nov 14, 2022
Pure CSS animated 3D Super Mario Icon

Pure CSS Super Mario This is the transferred source of a little sideproject I did in 2010. I initially did this without any CSS preprocessor and event

Andreas Jacob 14 Apr 15, 2021
CSS 3D renderer for Three.js.

CSS3D.js by Steven Wittens CSS 3D renderer for Three.js Note: this library is mostly obsolete now that Three.js has its own CSS 3D renderer which is i

null 365 Aug 27, 2022
sync CSS 3D transformations to a WebGL scene

gl-css3d Synchronize CSS 3D transformations to a WebGL scene Usage: var createCSS3D = require('gl-css3d'); // pass an HTML DOM element node, such as

null 30 Oct 17, 2022
Pure CSS Image Hover Effect Library

imagehover.css A Scaleable & Light Image Hover CSS Library Imagehover.css is a lovingly crafted CSS library allowing you to easily implement scaleable

Ciaran Walsh 1.8k Dec 21, 2022
A slideshow that uses a CSS glitch effect for slide transitions.

Glitch Slideshow A slideshow that uses the CSS Glitch Effect to transition between slides. Article on Codrops Demo Credits Images by Unsplash.com imag

Codrops 111 Dec 16, 2022
Some ideas for modern multi-layer page transitions using CSS Animations.

Multi-Layer Page Reveal Effects Some ideas for modern multi-layer page transitions using CSS Animations. Article on Codrops Demo Sponsor Demo sponsore

Codrops 117 Nov 1, 2022
Pure CSS (no JavaScript) implementation of Android Material design "ripple" animation

Pure CSS ripple effect (no JavaScript) CSS-only implementation of Android Material design "ripple" animation on click event Main advantage of this sol

Mladen Plavsic 334 Dec 11, 2022
CSS loading animations with minimal effort!

Whirl CSS loading animations with minimal effort! whirl is a curation of CSS loading animations(whirls! ?? ). It started as a drop in CSS file to get

Jhey Tompkins 1.4k Jan 4, 2023
🔮 CSS loading animations made by single element.

Three Dots The project is a set of CSS loading animations created with three dots which made by just single element. I think the project can not only

Zongbin 1.2k Dec 29, 2022
Pure css cross-browser loading animations.

[ArtWorx] xLoader Pure css cross-browser loading animations. xLoader is part of the ArtWorx collection. Most of the loaders made by community, You can

Anas Tawfik 21 Nov 15, 2021
Animatelo is a bunch of cool, fun, and cross-browser animations for you to use in your projects. This is a porting to Web Animation API of the fabulous animate.css project.

Animatelo Just-add-water Web Animations Animatelo is a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emp

GibboK 477 Nov 12, 2022
An old-school arcade-style 3D shoot-em-up rendered entirely with CSS 3D transforms

CSS Space Shooter Play The Game This is an experiment I made to investigate the capabilities of CSS 3D transforms. Having played about with this techn

Michael Bromley 162 Oct 2, 2022
A PostCSS plugin that transforms `css var` to `less var`.

PostCSS CSS var to Less var A PostCSS plugin to convert CSS variables to Less variables Installation npm install postcss-transform-css-var Examples /

cherry-man 9 Nov 28, 2022
A library for panning and zooming elements using CSS transforms :mag:

Panzoom Examples Panzoom is a small library (~3.7kb gzipped) to add panning and zooming functionality to an element. Rather than using absolute positi

Timmy Willison 1.8k Dec 26, 2022
Package fetcher is a bot messenger which gather npm packages by uploading either a json file (package.json) or a picture representing package.json. To continue...

package-fetcher Ce projet contient un boilerplate pour un bot messenger et l'executable Windows ngrok qui va permettre de créer un tunnel https pour c

AILI Fida Aliotti Christino 2 Mar 29, 2022