用定位实现机器人效果

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			*{
				margin: 0;
				padding: 0;
			}
			#robot{
				width: 600px;
				height: 500px;
				margin: 50px auto;
				border: 4px solid lightgrey;
				position: relative;
			}
			#robot .header{
				width: 222px;
				height: 117px;
				background: #A5B12D;
				position: absolute;
				left: 189px;
				top: 60px;
			}
			#robot .header .eyel{
				position: absolute;
				left: 55px;
				top: 45px;
				width: 20px;
				height: 20px;
				background: #fff;
			}
			#robot .header .eyer{
				position: absolute;
				right: 55px;
				top: 45px;
				width: 20px;
				height: 20px;
				background: #fff;
			}
			#robot .earl{
				width: 10px;
				height: 26px;
				position: absolute;
				left: 229px;
				top: 34px;
				background: #A5B12D;
			}
			#robot .earr{
				width: 10px;
				height: 26px;
				position: absolute;
				left: 371px;
				top: 34px;
				background: #A5B12D;
			}
			#robot .body{
				width: 222px;
				height: 135px;
				background: #A5B12D;
				position: absolute;
				top: 187px;
				left: 189px;
			}
			#robot .arml{
				width: 30px;
				height: 98px;
				background: #A5B12D;
				position: absolute;
				left: 150px;
				top: 187px;
			}
			#robot .armr{
				width: 30px;
				height: 98px;
				background: #A5B12D;
				position: absolute;
				left: 420px;
				top: 187px;
			}
			#robot .legl{
				width: 30px;
				height: 73px;
				position: absolute;
				background: #A5B12D;
				top: 322px;
				left: 230px;
			}
			#robot .legr{
				width: 30px;
				height: 73px;
				position: absolute;
				background: #A5B12D;
				top: 322px;
				left: 340px;
			}
		</style>
	</head>
	<body>
		<div id="robot">
			<div class="header">
				<div class="eyel"></div>
				<div class="eyer"></div>
			</div>
			<div class="earl"></div>
			<div class="earr"></div>
			<div class="body"></div>
			<div class="arml"></div>
			<div class="armr"></div>
			<div class="legl"></div>
			<div class="legr"></div>
		</div>
	</body>
</html>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值