当前位置: 首页 > article >正文

css画个熊猫

css画个熊猫
【html源码-一键复制查看效果】

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<style>
			* {
				margin: 0;
				padding: 0;
				box-sizing: border-box;
			}

			.box {
				position: relative;
				width: 300px;
				height: 260px;
				background-color: #55ff7f;
				border-radius: 20%;
				margin: 10% auto 5%;
				transition: all 0.6s;
			}

			.box:hover {
				transform: scale(1.2);
			}

			.headBox {
				position: relative;
				z-index: 5;
				width: 280px;
				height: 250px;
				border-radius: 300px;
				background-color: #fff;
				transform: rotate(-15deg);
			}

			.e1 {
				position: absolute;
				top: 30px;
				left: -25px;
				z-index: 1;
				width: 90px;
				height: 90px;
				border-radius: 50%;
				background-color: #000;
				transform: rotate(45deg);
			}

			.e2 {
				position: absolute;
				top: -20px;
				left: 174px;
				z-index: 1;
				width: 90px;
				height: 90px;
				border-radius: 50%;
				background-color: #000;
				transform: rotate(45deg);
			}

			.eye1 {
				position: absolute;
				top: 95px;
				left: 174px;
				z-index: 1;
				width: 73px;
				height: 75px;
				/* 不规则的圆形写法 */
				border-radius: 40% 60% 48% 52% / 50% 61% 39% 50%;
				background-color: #000;
				transform: rotate(-6deg);
			}

			.eye2 {
				position: absolute;
				top: 110px;
				left: 45px;
				z-index: 1;
				width: 73px;
				height: 75px;
				border-radius: 66% 34% 48% 52% / 60% 54% 46% 40%;
				background-color: #000;
				transform: rotate(20deg);
			}

			.y {
				position: absolute;
				top: 41px;
				left: 18px;
				z-index: 1;
				width: 40px;
				height: 10px;
				border: 4px solid #fff;
				border-radius: 50% 50% 0 0 / 100% 100% 0 0;
				border-bottom: none;
				transform: rotate(-23deg);
			}

			.nose {
				position: absolute;
				top: 175px;
				left: 135px;
				z-index: 1;
				width: 40px;
				height: 25px;
				border-radius: 50%;
				background-color: #000;
			}

			.mouth {
				position: absolute;
				top: 205px;
				left: 137px;
				z-index: 1;
				width: 40px;
				height: 20px;
				/* 半圆线条 */
				border: 1px solid black;
				border-radius: 0 0 50% 50%/0 0 100% 100%;
				border-top: none;
			}
		</style>
	</head>
	<body>
		<div class="box"> <!-- 耳朵 -->
			<div class="e1"></div>
			<div class="e2"></div> <!-- 头 -->
			<div class="headBox"> <!-- 眼睛 -->
				<div class="eye1">
					<div class="y"></div>
				</div>
				<div class="eye2">
					<div class="y"></div>
				</div> <!-- 鼻子 -->
				<div class="nose"></div> <!-- 嘴巴 -->
				<div class="mouth"></div>
			</div>
		</div>
	</body>
</html>

http://www.kler.cn/news/290610.html

相关文章:

  • 面试(九)
  • SAP HCM 如何追踪Z表的日志修改记录
  • Docker 入门指南:从安装到第一个容器
  • 安装vue-cli2.0并创建项目
  • 我该如何使用DevEco Studio进行开发呢
  • 09-02 周一 elasticsearch使用指南
  • Android U 多任务启动分屏——Launcher流程(更新中)
  • 自定义全局变量在uniapp的Vuex应用
  • 人工智能与机器学习原理精解【17】
  • 【JUnit单元测试框架】
  • vite 打包 学习
  • 能实现可算不可见的同态加密技术详解
  • PDF招生简章如何转二维码?
  • PostgreSQL分区表原理、案例的灵活应用
  • EventBus-Vue事件总线解析与使用指南
  • C++学习笔记(6)
  • C++11中的static_assert运算
  • 初学者指南:Spring Boot入门
  • 无人机的核心技术!!!
  • 打通Vue3+Flask(python3)+Mysql-实现简单数据交互
  • 会议音频方案
  • 2024.9.2
  • Orcad封装怎么添加
  • (每日一问)基础知识:Java垃圾回收机制详解
  • ES6基础----Promise的使用
  • UPDATE ... JOIN语法
  • 算法复盘——Leetcode hot100:链表160
  • 复变函数在大模型中的应用
  • 静态工厂模式(简单工厂模式)与动态工厂模式(工厂方法模式)
  • excel扒数据到ini文件小工具