Jump to content

Continually spin image with code

Go to solution Solved by yubrajs,

Recommended Posts

Hello,

On the homepage of https://www.kgbeauty.co/ I entered some code to spin an image continually. It works on the backend, but when I view the site live, it is not spinning. I am referencing the circle of text that says "SEATTLE MAKEUP ARTIST".

The code I am currently using in the Custom CSS is...

#block-yui_3_17_2_1_1705023988848_42937{ 
position: relative !important;
animation: rotate 30s linear infinite !important; 
  }

Thank you

Screenshot 2024-01-12 at 9.29.43 AM.png

Link to comment
  • Solution

You can achieve this with keyframe animation.

.fe-block-yui_3_17_2_1_1705023988848_42937{
	animation: spin 5s normal linear infinite;
}

@keyframes spin {
        0% {
          -webkit-transform: rotate3d(0, 0, 1, 0deg);
          transform: rotate3d(0, 0, 1, 0deg);
        }
        25% {
          -webkit-transform: rotate3d(0, 0, 1, 90deg);
          transform: rotate3d(0, 0, 1, 90deg);
        }
        50% {
          -webkit-transform: rotate3d(0, 0, 1, 180deg);
          transform: rotate3d(0, 0, 1, 180deg);
        }
        75% {
          -webkit-transform: rotate3d(0, 0, 1, 270deg);
          transform: rotate3d(0, 0, 1, 270deg);
        }
        100% {
          -webkit-transform: rotate3d(0, 0, 1, 360deg);
          transform: rotate3d(0, 0, 1, 360deg);
        }
      }

 

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.