Spinning Cube Feature Supported on Chrome and Firefox, Excludes Safari

Having created a stunning 3D cube using CSS that gracefully spins along both the X and Y axis in Chrome and Firefox, I was dismayed to find it completely stationary in Safari. Upon further investigation into the Safari console, no errors or exceptions were found either.

For those interested, here is an example of the spinning cube in action on Codepen: https://codepen.io/anon/pen/orGywz

/*Login Cube*/

            #cube-wrapper-login {
              position: absolute;
              left: 46%;
              top: 10%;
              perspective: 2000px;
            }

            .cube_login {
              position: relative;
              transform-style: preserve-3d;
              animation-name: rotate;
              animation-duration: 3.5s;
              animation-timing-function: linear;
              animation-iteration-count: infinite;
            }

            @keyframes rotate {
              0% {
                transform: rotate3d(0, 0, 0, 0);
              }
              100% {
                transform: rotate3d(1, 1, 0, 360deg);

              }
            }

            /*Additional cube face styling omitted for brevity*/

            .cube_login {
              transform: rotateX(90deg) rotateY(90deg);
            }
<div id="cube-wrapper-login">
          <div class="cube_login">
            <!-- A div for each face of the cube -->
            <br><br>
            <div id="front_face_login" class="face_login">XQUBE</div>
            <div id="right_face_login" class="face_login">XQUBE</div>
            <div id="back_face_login" class="face_login">XQUBE</div>
            <div id="left_face_login" class="face_login">XQUBE</div>
            <div id="top_face_login" class="face_login">XQUBE</div>
            <div id="bottom_face_login" class="face_login">XQUBE</div>
          </div>
        </div>

Answer №1

While I may not be the most knowledgeable about 3D transforms, it could potentially be as easy as making a simple change in your CSS. Admittedly, my understanding of the arguments for rotate3D is limited, so you might want to consider altering it to something like 180deg / 50%. Interestingly enough, there seems to be another post on SO addressing this very issue. It appears that an intermediate transform is required for some unforeseen reason. Check out: CSS Animation rotate3d not working in Safari

I also stumbled upon a handy online tool that could come in useful, although it may not be necessary in this scenario, Autoprefixer CSS online

@keyframes rotate {
  0% {
    transform: rotate3d(0, 0, 0, 0);
  }
  50% {
  transform: rotate3d(1, 1, 0, 180deg);
}
  100% {
    transform: rotate3d(1, 1, 0, 360deg); /*controls rotation amount on one axis) */
    ;
  }
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Preventing the cascading effects of past hovers with AngularJS

I am working with AngularJS and have the following HTML code snippet. <div class="row" style="margin-left:60px; text-align:center;"> <div class="col-xs-1 " style="margin-left:25px;width:10px; " ng-repeat="image_thumb_id in image_thumbnail_ ...

What could be causing the excessive vertical spacing in an HTML list on Chrome: PHP output or CSS styling?

I'm having difficulty understanding why there is a significant vertical offset (around 170px) between one <li> element and the next. This issue seems to only occur in Chrome and not in Firefox, specifically within <li> elements when PHP co ...

Preventing undesired form submissions in HTML and JavaScript

My question might be simple, but it's what I have in mind. When working with two buttons in HTML - one for form submission and the other to trigger a JavaScript event - both buttons end up submitting the form. How can I make sure the second button onl ...

Is there a way to create animated CSS box-shadow depth using jQuery or CSS3 transitions?

This code snippet applies delays but doesn't seem to update the style changes until the loop completes: for (i=20;i>=0;i--) { var boxShadow = i+"px "+i+"px "+i+"px #888"; $('article').css("box-shadow", boxShadow); ...

The resize handle on HTML input forms appears to be unresponsive in mobile browsers

When working on a website, I utilized the textarea html tag to generate a text input box. <textarea name="message" placeholder="Hello..." required class="input1 input1B" id="textBox"></textarea> However, ...

Guide to selecting a specific element in a loaded template depending on an *ngIf statement

I'm having trouble accessing an element in my template using a template variable as it keeps returning as undefined. At a specific route in my application, my component makes a call to fetch some data within the forkJoin method from rxjs. Due to the ...

Tips for shifting nested div containers to the left as the content expands

I have a div containing a dropdown menu, label, and button as shown below: <div class="container "> <div id="User"> <div id="BtnUser"> <div id="dropMe"> <div class="dropdown"> <a onclick="User ...

Configuring a background logo in WordPress using the Redux framework

I am attempting to integrate a "Logo upload" theme option using Redux framework, but I encountered an issue due to the logo being set up through a stylesheet in my HTML template. How can I configure this logo using an uploader? As a newcomer to WordPress a ...

Pagination displays identical data on each page

When utilizing pagination in my AngularJS application to display search results fetched from an API call, I encountered an issue where the same data set appears on all pages. Here's what I have attempted: Within the Controller $rootScope.currentPag ...

Is the dropping of the middle section in the inline list imminent?

After creating a fiddle to check for conflicts with other styles on my page, I ran into an issue with an inline list. There seems to be a slight drop in the middle item's positioning that I can't figure out. Despite trying various margin adjustme ...

Trouble with custom font causing text to be cut off in h1 and h2 sizes when window is

Update: After using a custom font "Gotham" in the @font-face, I encountered several bugs that seem to stem from this source. I'm unsure of how to resolve these issues while still retaining my custom font. Any suggestions? Update #2: The problem was r ...

Foundation 4 Framework: Mastering the Art of Clearing CSS Floats

I'm currently in the process of developing a website, but I am facing difficulties with clearing the floats. My website is built using the foundation 4 framework. Whenever I apply the .columns class to an element, it causes the elements to float left. ...

Ways to tally HTML elements using VBA

Currently, I am delving into the world of creating a web scraping tool using VBA to extract event details and store them in an Excel sheet. Within this endeavor, I am faced with deciphering HTML code snippets that resemble the following: <div class="a ...

Overriding the !important declaration in inline styles within various CSS IDs and classes

I need to find a way to override an inline !important declaration that is nested inside multiple CSS ids and classes. Let's analyze the following situation: <div class="A"> <div class="B"> <div class="C"> < ...

CSS and markup that appear the same are producing different renderings in the browser

I recently purchased the Ambrosia bootstrap theme, but I am facing difficulties with setting up the login page. You can view my login page here. The issue I am encountering involves the Twitter, Facebook, and Info icons that are positioned to the left of ...

Generating a list containing sub-items extracted from a JSON structure

I have created a list using the code provided in this fiddle. <ul></ul> var myList = [{ "title": "Home", "sub": 0, "url": "/home", "show": 1 }, { "title": "News", "sub": 0, ...

Having trouble with the Handlebars {{#if}} and {{elseif}} block helpers not functioning properly?

When working with handlebars.js, I am faced with the task of parsing complex JSON and displaying names in different styles based on certain conditions. The JSON structure is as follows: "TradeLine":{ "TradeLine":{ "Mor ...

Show a dynamic value in a div element on an HTML page using the text property

There is a value that I would like to display: var head=comments; The "comments" variable contains a string. Is there a way for me to achieve the following: var hoverText='text=comments'; <div "+hoverText+"></div> In order to ...

Tips for Retrieving and Modifying Bounds in Google Maps to Add or Remove Markers from a List

I'm currently facing a challenge where I need to retrieve the Bounds and Change Bounds in order to add and remove Marker information on my Added List below my Google Map. Similarly, with the Zoom change, I need to make adjustments because I am utiliz ...

Is your CSS not reflecting changes in Node.js?

I am having trouble getting the CSS to update in the browser using Browser Sync via Gulp on Node.js. What could be the issue? Below is my Gulp.js file: var themename = 'playtest haha 1'; var gulp = require('gulp'), // Prepare ...