How to add simple image as preloader

2 replies · opened Mar 18, 2019

TtarwaraMar 18, 2019

I want to display an image as a loader with rotating animation. code is below:


![attachment](imgpath/logo.png)

#myImg {
  -moz-animation: spinHorizontal 1.8s infinite linear;
    -o-animation: spinHorizontal 1.8s infinite linear;    
    -webkit-animation: spinHorizontal 1.8s infinite linear;
    animation: spinHorizontal 1.8s infinite linear;
}
@-moz-keyframes spinHorizontal {
    0% {
        -moz-transform: rotateY(0deg);
    }

    100% {
        -moz-transform: rotateY(360deg);
    }
}

@keyframes spinHorizontal {
	0% { 
        transform: rotateY(0deg); 
	}
    100% {
        transform: rotateY(360deg);
    }
}

@-ms-keyframes spinHorizontal {
	0% { 
        -ms-transform: rotateY(0deg); 
	}
    100% {
        -ms-transform: rotateY(360deg);
    }
}

@-o-keyframes spinHorizontal {
	0% { 
        -o-transform: rotateY(0deg); 
	}
	100% { 
        -o-transform: rotateY(360deg); 
	}
}

@-webkit-keyframes spinHorizontal {
	0% { 
        -webkit-transform: rotateY(0deg); 
	}
	100% { 
        -webkit-transform: rotateY(360deg); 
	}
}

How can I achieve it with gif image. I used this:
<body class="stretched" data-loader-html='
attachment
<div class="css3-spinner-bounce1"></div><div class="css3-spinner-bounce2"></div><div class="css3-spinner-bounce3"></div>'>

But it does not solve my purpose of smoothh rotating animation.

TtarwaraMar 18, 2019

Please rea this sentence "How can I achieve it with gif image. I used this:"
As

"I achieve it with gif image. I used this:"

SSemicolon WebSTAFFMar 18, 2019

Hello,

Please provide us with a Live URL so that we can check out the exact issue and provide you with more assistance on this. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard