css3动画的使用图片上下循环跳动


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;
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM