HTML(1)吃豆豆网页代码

编程知识 更新时间:2023-04-04 21:43:08
<!DOCTYPE html>
<html>
 <head>
  <meta charset="UTF-8">
  <title>吃豆豆</title>
	<style>
		body{
			margin: 0;
		}
		.main{
			width: 200px;
			height:200px;
			border-radius:50%;
			margin:200px;
			animation: peas 1s infinite linear;
		}
		.top{
			width: 200px;
			height:100px;
			margin-left:200px;
			background:#ffcc66;
			border-radius:100px 100px 0px 0px;
			animation: movetop 1s infinite;
		}
		.bottom{
			width: 200px;
			height:100px;
			margin-left:200px;
			background:#ffcc66;
			border-radius:0px 0px 100px 100px;
			animation: movebottom 1s infinite;
		}

		@keyframes movetop{
			0%{
				transform:rotate(0deg);
			}
			50%{
				transform: rotate(-30deg);
			}
			100%{
				transform: rotate(0deg);
			}
		}
		@keyframes movebottom{
			0%{
				transform:rotate(0deg);
			}
			50%{
				transform: rotate(30deg);
			}
			100%{
				transform: rotate(0deg);
			}
		}
		@keyframes peas{
			0%{
                box-shadow: 400px 0px 0px -80px #00cc00,
                            600px 0px 0px -80px #00cc00,
                            800px 0px 0px -80px #00cc00,
                            1000px 0px 0px -80px #00cc00;
            }
            100%{
                box-shadow: 200px 0px 0px -80px #00cc00,
                            400px 0px 0px -80px #00cc00,
                            600px 0px 0px -80px #00cc00,
                            800px 0px 0px -80px #00cc00;
            }
		}
	</style>
 </head>
 <body>
	<div class="main"> 
		<div class="top"></div>
		<div class="bottom"></div>
	</div>
 </body>
</html>

照着视频做出来的第一个html。我用的是EditPlus。Ctrl+B打开浏览器:

更多推荐

HTML(1)吃豆豆网页代码

本文发布于:2023-04-04 21:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/436edd7d576afef67667740082575eab.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网页代码   吃豆豆   HTML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 43618文章数
  • 14阅读数
  • 0评论数