Jump to content

Image flip on mobile - 7.0

Recommended Posts

Site URL: https://flywithaero.com

Hi.  Added this code to handle a hover image flip on desktop.  Is there an easy way to make it clickable to force the flip vs hover so that it works on mobile?  Thx!

 

/*Card Flip Effect */
#block-85a887d1dc5628d60653, #block-031ca31155a4ee12892f, #block-ec3b24d7d269c403c1c5 {
  /* Default Setup */
  &.image-block .sqs-block-content{
    perspective: 2000px;
  }
  .design-layout-poster {
    position: relative;
    transition: transform 0.8s;
    transform-style: preserve-3d;
  }
  //Image
  .design-layout-poster .intrinsic{
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  //Caption
  .design-layout-poster figcaption{
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    background: hsla(0,0%,15%,1);

    //Add if needed
    //border-radius: 20px;
  }

  /*Hover Effect*/
  &.image-block:hover .design-layout-poster {
    transform: rotateY(180deg);
  }
}

Link to comment
  • Replies 5
  • Views 250
  • Created
  • Last Reply

Top Posters In This Topic

On 3/24/2022 at 4:33 AM, cleverbeaver said:

Site URL: https://flywithaero.com

Hi.  Added this code to handle a hover image flip on desktop.  Is there an easy way to make it clickable to force the flip vs hover so that it works on mobile?  Thx!

 

/*Card Flip Effect */
#block-85a887d1dc5628d60653, #block-031ca31155a4ee12892f, #block-ec3b24d7d269c403c1c5 {
  /* Default Setup */
  &.image-block .sqs-block-content{
    perspective: 2000px;
  }
  .design-layout-poster {
    position: relative;
    transition: transform 0.8s;
    transform-style: preserve-3d;
  }
  //Image
  .design-layout-poster .intrinsic{
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  //Caption
  .design-layout-poster figcaption{
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    background: hsla(0,0%,15%,1);

    //Add if needed
    //border-radius: 20px;
  }

  /*Hover Effect*/
  &.image-block:hover .design-layout-poster {
    transform: rotateY(180deg);
  }
}

Do you mean making the following item clickable?

image.thumb.png.1b9e3b3281af70de76acffca538be505.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.