当前位置 CSS模版园 >> 酷炫特效 >> html5+css3“天狗食月”

html5+css3“天狗食月”

html5+css3“天狗食月”

完全由css3实现

<style>
body {overflow:hidden;background-color:#101010;}
#wrapper {position:absolute;top:100px;left:50%;width:200px;height:200px;margin-left:-100px;
	-webkit-animation-name: moonline;-webkit-animation-duration: 10s;-webkit-animation-timing-function: linear;-webkit-animation-iteration-count: infinite;
	-moz-animation-name: moonline;-moz-animation-duration: 10s;-moz-animation-timing-function: linear;-moz-animation-iteration-count: infinite;
}
@-webkit-keyframes moonline {
	0% {top:220px;left:30%;opacity:0;}
	30% {top:100px;left:50%;opacity:1;}
	50% {top:100px;left:50%;opacity:1;}
	80% {top:100px;left:50%;opacity:1;}
	100% {top:220px;left:80%;opacity:0;}
}
@-moz-keyframes moonline {
	0% {top:220px;left:30%;opacity:0;}
	30% {top:100px;left:50%;opacity:1;}
	50% {top:100px;left:50%;opacity:1;}
	80% {top:100px;left:50%;opacity:1;}
	100% {top:220px;left:80%;opacity:0;}
}
#circle {
	position: absolute;
	top: 0;
	left: 0;
	width: 200px;
	height: 200px;
	background-color: #EFEFEF;
	-webkit-box-shadow:0 0 40px #FFFFFF;
	-moz-box-shadow:0 0 40px #FFFFFF;
	box-shadow:0 0 40px #FFFFFF;
	border-radius: 100px;
	-webkit-animation-name: moonright;-webkit-animation-duration: 10s;-webkit-animation-timing-function: linear;-webkit-animation-iteration-count: infinite;
	-moz-animation-name: moonright;-moz-animation-duration: 10s;-moz-animation-timing-function: linear;-moz-animation-iteration-count: infinite;
}
@-webkit-keyframes moonright {
	0% {-webkit-box-shadow:0 0 10px #FFFFFF;}
	30% {-webkit-box-shadow:0 0 10px #FFFFFF;}
	40% {-webkit-box-shadow:0 0 20px #FFFFFF;}
	50% {-webkit-box-shadow:0 0 40px #FFFFFF;}
	60% {-webkit-box-shadow:0 0 20px #FFFFFF;}
	80% {-webkit-box-shadow:0 0 10px #FFFFFF;}
	100% {-webkit-box-shadow:0 0 10px #FFFFFF;}
}
@-moz-keyframes moonright {
	0% {-moz-box-shadow:0 0 10px #FFFFFF;}
	30% {-moz-box-shadow:0 0 10px #FFFFFF;}
	40% {-moz-box-shadow:0 0 20px #FFFFFF;}
	50% {-moz-box-shadow:0 0 40px #FFFFFF;}
	60% {-moz-box-shadow:0 0 20px #FFFFFF;}
	80% {-moz-box-shadow:0 0 10px #FFFFFF;}
	100% {-moz-box-shadow:0 0 10px #FFFFFF;}
}


#circle1 {
	display:block;
	content:"";
	position: absolute;
	top: -1px;
	left: -1px;
	width: 202px;
	height: 202px;
	background-color: #101010;
	border-radius: 100px;
	-webkit-animation-name: moon;-webkit-animation-duration: 10s;-webkit-animation-timing-function: linear;-webkit-animation-iteration-count: infinite;
	-moz-animation-name: moon;-moz-animation-duration: 10s;-moz-animation-timing-function: linear;-moz-animation-iteration-count: infinite;
}
@-webkit-keyframes moon {
	0% { left:-252px }
	30% { left:-252px }
	49% { left:0px;}
	51% { left:0px;}
	53% { left:0px;}
	80% { left:252px;}
	100% { left:252px;}
}
@-moz-keyframes moon {
	0% { left:-252px }
	30% { left:-252px }
	49% { left:0px;}
	51% { left:0px;}
	53% { left:0px;}
	80% { left:252px;}
	100% { left:252px;}
}
</style>
<div id="wrapper">
  <div id="circle"></div>
  <div id="circle1"></div>
</div>


声明本站所有资源仅供学习与参考,请勿用于商业用途。转载请注明来自:cssteach.com

原文http://cssteach.com/html/show-13-70.html

推荐模版

热门网站模版

猜您喜欢

热门网站模版

热门网站模版

评论

若文章内容有错误或无法下载,请在回复中说明(可无需登录,直接评论)