jeudi 1 octobre 2020

transform / rotate CSS bugging out on safari browsers

I'm building a series of flip boxes which have an image and title on the front and then on the reverse a background with some hyperlinks

All works fine on most browsers however on safari the boxes flicker for a few seconds when fliped over.

Can anyone see something I've missed?

https://codepen.io/xeddir/pen/VwaJpme

<div class="flip-card">
  <div class="flip-card-inner">
    <div class="flip-card-front">
      <img src="http://philk18.sg-host.com/wp-content/uploads/2020/09/card-test.jpg" alt="Avatar" style="width:250px;height:250px;opacity:0.5;">
        <div class="box-caption">
            <p> <b> Lines and Wrinkles </b> </p>
         </div>
    </div>
    <div class="flip-card-back">
        <div class="flip-card-title">Lines and wrinkles</div> 
        <a class="one" href="/skin-boosters" target="_blank"> - Skin Boosters</a><br><a class="one" href="/derma-fillers" target="_blank"> - Derma Fillers</a>
    </div>
  </div>
</div>


    .flip-card {
      background-color: transparent;
      width: 250px;
      height: 250px;
      perspective: 1000px;
      margin-left:50px;
    }
    
    .flip-card-inner {
      position: absolute;
      width: 100%;
      height: 100%;
      text-align: left;
      t

ransition: transform 0.6s;
  transform-style: preserve-3d;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(181deg);
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  -ms-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility:hidden;
  backface-visibility: hidden;
}

.flip-card-front {
  background-color: black;
  color: black;
}

.box-caption {
position: absolute;
    top: 55%;
    left: 50%;
  z-index: 2;
  margin-right: -50%;
    transform: translate(-50%, -50%);
  color: white;
  text-align:center;
  padding-left:25px;
  padding-right:25px;
  font-size: 20px;
  word-wrap: break-word;
  display: block;
}

.flip-card-back {
  padding-top:0px;
  padding-left:25px;
  background:linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(8,30,37,1) 18%, rgba(50,195,192,1) 100%);;

  color: white;
   transform: rotateY(-180deg);
  -webkit-transform: rotateY(-180deg);
  -moz-transform: rotateY(-180deg);
  -ms-transform: rotateY(-180deg);
  -o-transform: rotateY(-180deg);
  word-wrap: break-word;
  padding-right:15px;
  display: block;
  font-size: 13px;
}

.flip-card-title {
  padding-top:15px;
  font-weight: bold;
  padding-bottom: 10px;
  color: white;
  word-wrap: break-word;
  padding-right:15px;
  display: block;
  font-size: 16px;
}

.button {
  background-color: #4CAF50; /* Green */
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
}


a.one:link { 
    color: white !important; 
    text-decoration: none !important;
}

a.one:active { 
    color: white !important; 
    text-decoration: none !important;
}

a.one:hover{ 
    color: white !important; 
    text-decoration: underline !important;
}

a.one:visited { 
    color: white !important; 
    text-decoration: none !important;
}

Thanks




Aucun commentaire:

Enregistrer un commentaire