Trguti 2021-06-23 08:46 采纳率: 50%
浏览 163
已采纳

css画这只熊猫 求代码!!!急

 

  • 写回答

2条回答 默认 最新

  • 有菜又爱玩呀~ 2021-06-23 08:56
    关注
    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8">
    		<title></title>
    	</head>
    	<style>
    		body {
    		  background-color: #e6cff6;
    		  text-align:center;  
    		  height: 100%; 
    		  margin: 0px;
    		}
    		#panda{  
    		  margin: 80px auto;
    		  position: relative;
    		  height:417px;
    		  width:417px;
    		}
    		#panda div{
    			position:absolute;
    		}
    		#panda div::before, #panda div::after {
    		  content:'';
    		  position:absolute;
    		  display:block;
    		}
    		.head{
    		  z-index:2;
    		  width:130px;
    		  height:95px;
    		  background-color: white;				
    		  border-radius: 80px 80px 60px 60px;
    		  border: 4px solid black;
    		  top:85px;
    		  left:128px;
    		}
    		/*nose*/
    		.face{
    		  z-index: 3;
    		  width: 12px;
    		  height: 6px;
    		  background-color: black;
    		  border-radius:100%;
    		  top:154px;
    		  left: 190px;
    		 }
    		 /*black part around eyes*/
    		 	 /*Left black part of eye*/
    		 .eyes::before{
    			z-index: 4;
    			display:block;
    			width: 30px;
    			height: 40px;
    			top: 115px;
    			left: 210px;
    			transform: rotate(-20deg);
    			background-color: black;
    			border-radius: 100% 100% 88% 88% /100% 100% 88% 88%;
    		 }
    			 /*Right black part of eye*/
    		 .eyes::after{
    			z-index: 4;
    			display:block;
    			width: 30px;
    			height: 40px;
    			top: 115px;
    			left: 154px;
    			transform: rotate(20deg);
    			background-color: black;
    			border-radius: 100% 100% 88% 88% /100% 100% 88% 88%;
    		 }
    		 /*eye balls*/
    		 .eye-balls{
    		  z-index: 5;
    		  width:10px;
    		  height:10px;
    		  background-color:white;
    		  box-shadow: 0 0 0 1px black, 54px 0 0 white, 54px 0 0 1px black;
    		  border-radius:100%;
    		  top: 125px;
    		  left: 164px;
    		}
    		/*eye shine*/
    		.eye-balls::after{
    		  z-index: 5;
    		  width:3px;
    		  height:3px;
    		  background-color:white;
    		  box-shadow: 0 0 0 1px white, 54px 0 0 white, 54px 0 0 1px white;
    		  border-radius:100%;
    		  top: 10px;
    		  left: 10px;
    		}
    		.body{
    		  z-index: 1;
    		  width: 90px;
    		  height: 80px;
    		  background-color: white;
    		  border-top-left-radius: 40%;
    			border-top-right-radius: 40%;
    			border-bottom-right-radius: 30%;
    			border-bottom-left-radius: 30%;
    		  border: 4px solid black;
    		  top:168px;
    		  left:148px;
    		}
    			/*right ear*/
    		.ears::before{
    		  width:50px;
    		  height:50px;
    		  background-color: black;
    		  border-radius: 100%;
    		  top:90px;
    		  left:228px;
    		}
    			/*left ear*/
    		.ears::after{
    		  width:50px;
    		  height:50px;
    		  background-color: black;
    		  border-radius: 100%;
    		  top:90px;
    		  left:117px;
    		  }
    		 /*beginning of paws*/
    		 	/*Bottom paws*/
    		.paws{
    		  width:26px;
    		  height:66px;
    		  background-color: black;
    		  border-radius:0 0 80px 80px;
    		  box-shadow: 50px 0 0 black;
    		  top:210px;
    		  left:158px;
    		}
    			/*Top Left paw*/
    		.paws::before {
    		  z-index: 2;
    		  width: 30px;
    		  height:34px;
    		  background-color: black;
    		  border-radius:80px 0px 80px 80px;
    		  left:-8px;
    		  top:-19px;
    		  transform: rotate(-80deg);
    		}
    			/*Top Right paw*/
    		.paws::after {
    		  z-index: 2;
    		  width: 30px;
    		  height:34px;
    		  background-color: black;
    		  border-radius:0px 80px 80px 80px;
    		  left:55px;
    		  top:-19px;
    		  transform: rotate(80deg);
    		}
    	</style>
    	<body>
    		<div id="panda">
    		  <div class="head"></div>
    		  <div class="face"></div>
    		  <div class="eyes"></div>
    		  <div class="eye-balls"></div>
    		  <div class="body"></div>
    		  <div class="paws"></div>
    		  <div class="ears"></div>
    		</div>
    	</body>
    </html>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)