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

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>

相关文章:

  • C语言:刷题笔记
  • MyCat
  • ant vue design日期组件date-picker自定义快捷选择日期封装
  • OpenXR Monado创建Swapchain和生成纹理
  • Verilog基础,原码,反码与补码的概念
  • 透明加密为什么是最佳选择,10款透明加密软件推荐
  • CGLIB 是什么
  • Linux驱动(四):Linux2.6字符设备驱动及GPIO子系统
  • [数据集][目标检测]鲜花检测数据集VOC+YOLO格式25215张106类别
  • 【2024-2025源码+文档+调试讲解】微信小程序的城市公交查询系统
  • 三级_网络技术_59_应用题
  • 机器学习:svm算法原理的优缺点和适应场景
  • 【Python】数据分析分类图可视化
  • C++入门day3-面向对象编程(中)
  • c++ unordered_set的用法
  • 登录-异步请求用户数据无法保存-bug
  • Django+Vue宠物服务管理系统的设计与实现
  • Vue(十) 过渡动画、配置代理服务器,解决请求跨域的问题
  • 项目策划书六度自由双足机器人
  • JetBrains`s IntelliJ IDEA springboot项目 gradle-bin安装 国内加速
  • 万科:一季度营收近380亿元,销售回款率超100%
  • 建发股份:将于5月6日召开股东大会,审议提名林茂等为公司新一届董事等议案
  • 日趋活跃!2024年我国数据生产总量同比增长25%
  • 北京朝阳涉住宅组团地块126亿元成交
  • 最近这75年,谁建造了上海?
  • 商务部:将积极会同相关部门加快推进离境退税政策落实落地