Image flipping effect malfunctioning in Safari and Internet Explorer

My image flipping effect is not functioning properly in Safari and IE browsers.

Here is the code I am using:

.flipcard {
  position: relative;
  width: 220px;
  height: 220px;
  perspective: 500px;
  margin: auto;
  text-align: center;
}
.flipcard.v:hover .front, .flipcard.v.flip .front{
  transform: rotateX(180deg);
  -webkit-transform:transform: rotateX(180deg); /* Chrome, Safari, Opera */
}
.flipcard.v:hover .back, .flipcard.v.flip .back{
  transform: rotateX(0deg);
    -webkit-transform:transform: rotateX(0deg); /* Chrome, Safari, Opera */
}
.flipcard.v .back{
  transform: rotateX(-180deg);
}
.flipcard.h:hover .front, .flipcard.h.flip .front{
  transform: rotateY(180deg);
   -webkit-transform:transform: rotateY(180deg); /* Chrome, Safari, Opera */
}
.flipcard.h:hover .back, .flipcard.h.flip .back{
  transform: rotateY(0deg);
   -webkit-transform:transform: rotateY(0deg); /* Chrome, Safari, Opera */
}
.flipcard.h .back{
  transform: rotateY(-180deg);
   -webkit-transform:transform: rotateY(-180deg); /* Chrome, Safari, Opera */
}
.flipcard .front, .flipcard .back
{
  position: absolute;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  transition: all 0.5s ease-in;
  color: white;
  border: 30px solid rgba(255, 255, 255, 0.5);
  backface-visibility: hidden;
   -webkit-transform:backface-visibility: hidden; /* Chrome, Safari, Opera */
}


.text_div{ background:#EF6A36; width:160px; height:160px; margin:0px; padding:0px;}
.text_div > img {
    margin-top: -18px;
}


.flipcard p{font-size:14px;}
.text_div > h1 {
    color: #fff;
    height: 80px;
    padding: 20% 5%;
    width: 90%;
    font-size:23px;
    text-transform: uppercase;
    line-height:60px;
}

.back > a {
    background:#EF6A36;
    color: #fff;
    float: left;
    font-family: helvetica_neuebold;
    font-size: 24px;
    font-weight: normal;
    height: 42px;
    list-style: outside none none;
    padding: 60px 0;
    text-align: center;
    text-decoration: none;
    width: 160px;
    font-family: "HelveticaNeueLTPro-Cn";
    margin-top:-21px;
}

HTML:-

<div class="flipcard h">
    <div class="front">
        <div class="text_div">
            <img src="<?php echo get_template_directory_uri(); ?>/images/heart.png">
            <h1>Brand Blazing</h1>
            <!--<p>Your truth . Your story. - Your rand</p> -->
        </div>
    </div>
    <div class="back">
        <img   class="icon_margin" class="icon_margin" src="<?php echo get_template_directory_uri(); ?>/images/heart.png">
        <a href="<?php echo site_url(); ?>/brand">YOUR TRUTH</a>
    </div>
</div>

The flipping effect works only on Mozilla and Chrome. I have tried searching on Google for solutions but with no luck. Any suggestions or alternatives would be greatly appreciated by anyone who can help.

Answer №1

All the -webkit-transform declarations are incorrect. They appear in this format:

-webkit-transform:transform: XXXXXX;

when they should be like this:

-webkit-transform: XXXXXX;

Furthermore,

-webkit-transform:backface-visibility: hidden;

should actually be:

-webkit-backface-visibility: hidden;


 

.flipcard {
  position: relative;
  width:220px;
  height: 220px;
  perspective: 500px;
  margin:auto;
  text-align:center;
}
.flipcard.v:hover .front, .flipcard.v.flip .front{
  transform: rotateX(180deg);
  -webkit-transform: rotateX(180deg); /* Chrome, Safari, Opera */
}
.flipcard.v:hover .back, .flipcard.v.flip .back{
  transform: rotateX(0deg);
    -webkit-transform: rotateX(0deg); /* Chrome, Safari, Opera */
}
.flipcard.v .back{
  transform: rotateX(-180deg);
  -webkit-transform: rotateX(-180deg);
}
.flipcard.h:hover .front, .flipcard.h.flip .front{
  transform: rotateY(180deg);
   -webkit-transform: rotateY(180deg); /* Chrome, Safari, Opera */
}
.flipcard.h:hover .back, .flipcard.h.flip .back{
  transform: rotateY(0deg);
   -webkit-transform: rotateY(0deg); /* Chrome, Safari, Opera */
}
.flipcard.h .back{
  transform: rotateY(-180deg);
   -webkit-transform: rotateY(-180deg); /* Chrome, Safari, Opera */
}
.flipcard .front, .flipcard .back
{
  position:absolute;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  transition: all 0.5s ease-in;
  color: white;
  border:30px solid rgba(255, 255, 255, 0.5);
  backface-visibility: hidden;
   -webkit-backface-visibility: hidden; /* Chrome, Safari, Opera */
}


.text_div{ background:#EF6A36; width:160px; height:160px; margin:0px; padding:0px;}
.text_div > img {
    margin-top: -18px;
}


.flipcard p{font-size:14px;}
.text_div > h1 {
    color: #fff;
    height: 80px;
    padding: 20% 5%;
    width: 90%;
    font-size:23px;
    text-transform:uppercase;
    line-height:60px;
}

.back > a {
    background:#EF6A36;
    color: #fff;
    float: left;
    font-family: helvetica_neuebold;
    font-size: 24px;
    font-weight: normal;
    height: 42px;
    list-style: outside none none;
    padding: 60px 0;
    text-align: center;
    text-decoration: none;
    width: 160px;
    font-family: "HelveticaNeueLTPro-Cn";
    margin-top:-21px;
}
<div class="flipcard h">
    <div class="front">
      <div class="text_div">
      <img src="<?php echo get_template_directory_uri(); ?>/images/heart.png">
      <h1>Brand Blazing</h1>
      <!--<p>Your truth . Your story. - Your rand</p> -->
      </div>
    </div>
    <div class="back">
    <img   class="icon_margin" class="icon_margin" src="<?php echo get_template_directory_uri(); ?>/images/heart.png">
     <a href="<?php echo site_url(); ?>/brand">YOUR TRUTH</a>
    </div>
</div>

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

Issues with Ajax arise once URL re-routing is activated

When loading content using AJAX and ASP.NET web-methods, the following code is used to trigger the Ajax request: var pageIndex = 1; var pageCount; $(window).scroll(function () { if ($(window).scrollTop() == $(document).height() - $(window).height()) ...

What is the best way to implement the settimeout method in react?

I need assistance on how to effectively utilize the setTimeout() method in my code. Specifically, I am looking to trigger a click event on an element after a certain delay and execute a function afterwards. Here is the current implementation of my code: ...

Angular CDKScrollable not triggering events

I'm having trouble making the angular CdkScrollable work when creating my own div: <div class="main-section" id="mainsection" #mainsection CdkScrollable> <div class="content" style="height: 300px; backgr ...

Problem uploading images to server and database

I'm currently experiencing difficulties with photo uploads on my website. The issue arises at the $fileName = basename($_FILES["file"]["name"]); line where I receive the error message "Please select a file to upload". There seems to be no database in ...

Is there a way to simultaneously click on a link on one page and alter the position of a particular class on another page?

I have been working on designing two pages for a website. I am looking to use JavaScript to ensure that when a link on page 1 is clicked and the user transitions to page 2, the second tab button (btn) will have an id of "default" and receive the activate c ...

How to eliminate background after Ajax call is done using jQuery?

After successfully creating my own tooltips with jQuery and Ajax to pull content from an external file, I encountered a problem. I have a loading.gif animation in the background of the container that I want to remove once the ajax content loads. Can anyone ...

Developing a Highchart Graph using JavaScript

I am trying to develop a high chart graph. Check out my code on FIDDLE LINK. I have two values, a and b, for the x-axis and y-axis. The issue arises when the difference between a and b is minimal, such as when both are equal (-9). In such cases, the grap ...

How can I show the configuration in Laravel?

After updating my pages to utilize an extended header for consistent content across all pages, I encountered an issue with the footer configuration. Whenever I attempt to retrieve a configuration from Laravel, it appears as normal text instead of being pro ...

What are the steps to generate a production build directory in a React project?

Currently, I am developing a website utilizing react for the frontend and node.js for the backend. However, I'm unsure of how to deploy it to the live server. After conducting some research, I learned that I need to create a build folder. To provide a ...

Tips for correctly positioning CSS elements:

I am currently working on a slider using noUi Slider and aiming for an elegant solution. To accommodate the large size of the handle, I expanded the base UI with extra values which are not allowed, causing the handle to jump back to the permitted values. T ...

The bidirectional data binding feature is malfunctioning following an XMLHttpRequest request

When watching a property from Vuex, I use the following approach: computed: { ticket() { return this.$store.getters['order/reservation'].offer_id } }, watch: { ticket(newTicketId) { console.log('Caught change of ...

Footer not disappearing

Need assistance! My footer isn't showing up properly at the bottom even after applying clear:both. Can someone help please? If anyone can provide guidance, it would be greatly appreciated. Thanks for all your help in resolving the issue. ...

Best method for creating HTML elements with jQuery

I've come across various styles and methods for creating elements in jQuery, each with its own unique approach. I am interested in discovering the most effective way to construct elements and whether a specific method stands out as superior for any pa ...

The array containing numbers or undefined values cannot be assigned to an array containing only numbers

Currently facing an issue with TypeScript and types. I have an array of IDs obtained from checkboxes, which may also be empty. An example of values returned from the submit() function: const responseFromSubmit = { 1: { id: "1", value: "true" }, 2: ...

Generate a key pair using the cryto library and then use it with the json

There's a new method called generateKeyPair in node 10, and I am utilizing it in the following way: const { publicKey, privateKey } = crypto.generateKeyPairSync("rsa", { modulusLength: 4096, publicKeyEncoding: { type: "spki", format: "pem ...

Issue with Javascript/Jquery functionality within a PHP script

I have been attempting to incorporate a multi-select feature (view at http://jsfiddle.net/eUDRV/318/) into my PHP webpage. While I am able to display the table as desired, pressing the buttons to move elements from one side to another does not trigger any ...

Ways to acquire dynamic content without relying on Remark/Grey Matter

In my stack of technologies, I am using nextJS with react and typescript. While I have successfully set dynamic routes for my blog posts, I am now facing a challenge in creating pages that do not rely on markdown. Despite searching extensively for code exa ...

Customizing functions in JavaScript with constructor property

What is the best way to implement method overriding in JavaScript that is both effective and cross-browser compatible? function Person(firstName, lastName) { this.firstName = firstName; this.lastName = lastName; ...

How can I send a JSON array using jQuery's .post method?

After numerous attempts to work with json, I am now faced with a new challenge - How can I post this specific json array: [{"success":true,"filename":"agard.jpg"}] using jquery.post, $.post("process.php", json ,function(xml){ }); So that I can retriev ...

Modifying the background hue of the element-ui tooltip

I am currently working with vue.js version 2.6.10 and element-ui version 2.15.1. The element-ui component I am using is as follows: <el-tooltip content="Top center" placement="top"> <span>Dark</span> ...