<div class="zan zan-anim"></div>
body {
	display: flex;
	height: 100vh;
}
.zan {
	margin: auto;
	width: 100px;
	height: 100px;
	background: url(https://cdn2.jianshu.io/assets/web/zan_animation_steps-8d65a474b670eb6a022516f4e0b8e9a4.png) left center no-repeat;
}
.zan-anim {
	animation: tt .8s steps(20, start) infinite;
}
@keyframes tt {
	to {
		background-position: right;
	}
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js