animation动画使用

图片上下循环跳转
html代码:

<div class="siteicon">
		<img src="./siteicon.png" alt="">
		<p>点击跳转</p>
	</div>

css代码:

@keyframes icon{
	0%{
    opacity: 0.8;
		transform: translate(0,0);
	}
	50%{
    opacity: 1;
		transform: translate(5px,15px);
	}
	100%{
    opacity: 0.8;
		transform: translate(0,0);
	}
}
.siteicon{
	width: 200px;
	height: 200px;
	text-align: center;
	margin: 200px auto;
	animation:  icon 3s linear infinite;
}
p{
	color: #f9743a;
}

相关文章:

  • 2021-08-06
  • 2021-09-04
  • 2022-12-23
  • 2022-01-02
  • 2022-02-08
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
相关资源
相似解决方案