利用HTML+CSS制作一个哆啦A梦

 制作出来的效果如下图所示:

 

 完整代码实现:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.whole{
				/* border:1px solid black; */
				position: absolute;
			}
			.head{
				border:2px solid black;
				width: 330px;
				height: 330px;
				background-color: #0ab2d9;
				margin-left: 150px;
				margin-top: 50px;
				border-radius:100%;
				background-image: -moz-radial-gradient(99% 1%, #fff, #0C99C7 75%, black 100%);
			}
			.face{
				border:2px solid black;
				width: 280px;
				height: 250px;
				margin-left: 26px;
				margin-top: -40px;
				background-color: #fff;
				border-radius:90%;
				/* position: absolute;
				 z-index:0; */
			}
			.leye{
				border:2px solid black;
				width: 80px;
				height: 90px;
				margin-left: 90px;
				margin-top: 40px;
				background-color: #fff;
				border-radius:35px 35px 35px 35px;
				position: relative
			}
			.reye{
				border:2px solid black;
				width: 80px;
				height: 90px;
				margin-left: 170px;
				margin-top: -91px;
				background-color: #fff;
				border-radius:35px 35px 35px 35px;
				position: relative
			}
			
			.leyeball{
				border:2px solid black;
				width: 10px;
				height: 10px;
				margin-left: 140px;
				margin-top: -40px;
				background-color: #000;
				border-radius:35px 35px 35px 35px;
				position: relative
			}
			.reyeball{
				border:2px solid black;
				width: 10px;
				height: 10px;
				margin-left: 186px;
				margin-top: -12px;
				background-color: #000;
				border-radius:35px 35px 35px 35px;
				position: relative
			}
			.nose{
				border:2px solid black;
				width: 28px;
				height: 28px;
				margin-left: 155px;
				margin-top: -200px;
				
				border-radius:35px 35px 35px 35px;
				position: relative
				background-color: w;
				background-image: radial-gradient(white, #d46835, #c83f00);
				
			}
			.whiskers{
				width: 70px;
				height: 1px;
				border: 0.1px solid black;
				background-color: black;
				position: relative
			}
			.lf{
				
			    position: relative;
			    top: -196px;
			    left: 39px;
			    transform: rotate(15deg);
			}
			.ls{
			    position: relative;
			    top: -179px;
			    left: 40px;
			}
			.lt{
				position: relative;
				top: -160px;
				left: 40px;
				transform: rotate(-15deg);
			}
			.rf{
			    position: relative;
			    top: -204px;
			    left: 214px;
			    transform: rotate(-15deg);
			}
			.rs{
			    position: relative;
			    top: -186px;
			    left: 214px;
			}
			.rt{
				position: relative;
				top: -169px;
				left: 214px;
				transform: rotate(15deg);
			}
			.m1{
				width: 1px;
				height: 84px;
				border: 0.1px solid black;
				left: 168px;
				top: -2px;
				background-color: black;
				position: relative
			}
			.m2{
				width: 145px;
				height: 115px;
				border-radius: 100px;
				border-bottom: 1px solid black;
				position: relative;
				left: 93px;
				top: -116px;			        
			}
			.tie{
		        width: 290px;
		        height: 25px;
		        border-radius: 100px;
		        border: 2px solid #000;
		        background-image: linear-gradient(to top, #640C04, #B13206);
		        position: relative;
		        left: 172px;
		        top: -58px;
		        z-index: 20;		
			}
			.bell{
		        width: 36px;
		        height: 36px;
		        border-radius: 18px;
				background-color: #e3df17;
		        
		        border: 2px solid #000;
		        position: relative;
		        left: 300px;
		        top: -78px;
		        z-index: 30;		
			}
			.b1{
		        width: 34px;
		        height: 3px;
		        border: 2px solid #000;
		        border-top-left-radius: 3px;
		        border-top-right-radius: 4px;
		        background-color: none;
		        position: relative;
		        top: 9px;
		        left: -1px;		
			}
			.b2{
		        width: 10px;
		        height: 10px;
		        background-color: #000;
		        position: relative;
				border-radius: 100% ;
		        left: 13px;
		        top: 10px;		
			}
			.b3{
		        width: 2px;
		        height: 10px;
		        background-color: #000;
		        position: relative;
		        left: 16px;
		        top: 10px;		
			}
			.belly{
		        width: 160px;
		        height: 160px;
		        border-radius: 75px;
		        background-color: #fff;
		        border: 2px solid #000;
		        position: relative;
		        left: 40px;
		        top: -25px;		
				
				     
			}
			.pocket{
				width: 130px;
				height: 65px;
				/* border-radius: 60px; */
				border-radius: 0px 0px 120px 120px ;
				background-color: #fff;
				border: 2px solid #000;
				position: relative;
				/* position: absolute;
				z-index: 15; */
				left: 15px;
				top: 70px;   
			}
			.leg{
		        width: 243px;
		        height: 170px;
		        background-color: #07abdd;
		        border: 2px solid #333;
		        position: relative;
		        top: -100px;
		        left: 194px;
		        z-index: 10;
				/* border-left: 2px solid black; */
				border-image: -webkit-linear-gradient(top, transparent 50%, black 50%, black 100%) 1;
			}
			.arm{
				width: 110px;
				height: 57px;
				background-color: #07abdd;
				border: 2px solid #333;
				position: relative;
				
				transform-origin: 0 50%;
			}
			.larm{
				top: -228px;
				left: 113px;			    
				transform: rotate(-30deg);	
				box-shadow: -5px 2px 10px 2px #333;
			}
			.rarm{
				top: -342px;
				left: 423px;
				transform: rotate(30deg);
			}
			.hand{
				width: 70px;
				height: 70px;
				border-radius: 35px;
				border: 2px solid #333;
				background-color: #fff;
				position: relative;
			}
			.lhand{
				left: 62px;
				top: -350px;				    
			}
			.rhand{			
				left: 487px;
				top: -418px;		
			}
			.ll{
		        width: 20px;
		        height: 20px;
		        border-radius: 10px ;
		        border-radius: 10px 10px 0px 0px ;
		        background-color: #fff;
		        border: 2px solid #333;
		        position: absolute;
		        left: 110px;
		        top: 150px;
		        z-index: 15;		
			}
			.foot{
				width: 132px;
				height: 33px;
				border: 2px solid #333;
				background-color: #fff;
				position: relative;
			}
			.lfoot{
				border-top-right-radius: 45px;
				border-bottom-right-radius: 45px;
				border-top-left-radius: 65px;
				border-bottom-left-radius: 45px;				
				left: 172px;
				top: -384px;
				z-index: 15;
				box-shadow: -1px 0px 10px 2px #333;
				        
			}
			.rfoot{		        
		        border-top-right-radius: 65px;
		        border-bottom-right-radius: 45px;
		        border-top-left-radius: 45px;
		        border-bottom-left-radius: 45px;
		        left: 327px;
		        top: -420px;
		        z-index: 15;
		        /* box-shadow: -1px 1px 10px 2px #333;	 */	
			}
		</style>
	</head>
	<body>
		<div class="whole">
			<div class="head">
				<div class="eye">
					<div class="leye"></div>
					<div class="reye"></div>
				</div>
				<div class="eyeball">
					<div class="leyeball"></div>
					<div class="reyeball"></div>
				</div>
				<div class="face"></div>
				<div class="nose"></div>
				<div class="mouse">
					<div class="m1"></div>
					<div class="m2"></div>
				</div>
					<div class="whiskers lf"></div>
					<div class="whiskers ls"></div>
					<div class="whiskers lt"></div>
					<div class="whiskers rf"></div>
					<div class="whiskers rs"></div>
					<div class="whiskers rt"></div>
			</div>
			<div class="body">
				<div class="tie"></div>
				<div class="bell">
					<div class="b1"></div>
					<div class="b2"></div>
					<div class="b3"></div>
				</div>
				
				
				<div class="leg">
					<div class="belly">
						<div class="pocket"></div>
					</div>
					<div class="ll"></div>
				</div>
				<!-- <div class="arm"> -->
					<div class="arm larm"></div>
					<div class="arm rarm"></div>
				<!-- </div> -->
				<!-- <div class="hand"> -->
					<div class="hand lhand"></div>
					<div class="hand rhand"></div>
				<!-- </div> -->
				
				<!-- <div class="foot"> -->
					<div class="foot lfoot"></div>
					<div class="foot rfoot"></div>
				<!-- </div> -->
			</div>
		</div>
		
	</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值