<html>
<head>
<meta charset="utf-8" />
<title>j绝对定位</title>
<style>
body {
background: -webkit-linear-gradient(top,#2B8BD2 0%,#59D2A5 100%);
}
.face{
width: 300px;
height: 200px;
border: 1px solid #ccc;
margin: 200px auto;
background-color: orange;
position:relative;
}
.ear {
width: 45px;
height: 200px;
background-color: orange;
position: absolute;
}
.ear_left {
transform: rotate(-38deg);
top: -154px;
left: -48px;
border-radius: 56px 0 0 0;
}
.ear_right {
transform: rotate(34deg);
left: 301px;
top: -160px;
border-radius: 0 56px 0 0;
}
.ear_left .a {
background-color: #000;
width: 100%;
height: 52px;
border-radius: 56px 0 0 0;
}
.ear_right .a {
background-color: #000;
width: 100%;
height: 52px;
border-radius: 0 56px 0 0;
}
.eye_left {
position:absolute;
width:45px;
height:45px;
border-radius:50%;
background:#222;
left: 52px;
top: 48px;
overflow:hidden;
}
.eye_left .ball_1 {
position:absolute;
width:16px;
height:16px;
border-radius:50%;
background:#fff;
top:26px;
left:10px;
}
.eye_left .ball_2 {
position:absolute;
width:10px;
height:10px;
border-radius:50%;
background:#fff;
top:12px;
left:28px;
}
.eye_right {
position:absolute;
width:45px;
height:45px;
border-radius:50%;
background:#222;
right: 52px;
top: 48px;
overflow:hidden;
}
.eye_right .ball_1 {
position:absolute;
width:16px;
height:16px;
border-radius:50%;
background:#fff;
top:12px;
left:5px;
}
.eye_right .ball_2 {
position:absolute;
width:10px;
height:10px;
border-radius:50%;
background:#fff;
top:26px;
left:27px;
}
.norse {
width: 13px;
height: 9px;
background: #000;
position: absolute;
bottom: 66px;
left: 139px;
border-radius: 0 0 6px 6px;
}
.mouth{
width: 50px;
height: 30px;
background: #D80C32;
position: absolute;
border-radius: 0 0 20px 20px;
left: 122px;
bottom: 13px;
}
.lianjia_left {
width: 40px;
height: 40px;
background: red;
position: absolute;
border-radius:50%;
bottom:28px;
left:20px;
}
.lianjia_right {
width: 40px;
height: 40px;
background: red;
position: absolute;
border-radius:50%;
bottom:28px;
right:20px;
}
.blink {
animation:blink_frames 5s infinite ease;
}
@keyframes blink_frames {
0% {
height:45px;
}
40% {
height:5px;
top:75px;
}
80% {
height:5px;
top:75px;
}
100% {
height:45px;
top: 48px;
}
}
</style>
</head>
<body>
<div class='face'>
<div class='ear ear_left'>
<div class='a'></div>
</div>
<div class='ear ear_right'>
<div class='a'></div>
</div>
<div class='eye_left blink'>
<div class='ball_1'></div>
<div class='ball_2'></div>
</div>
<div class='eye_right blink'>
<div class='ball_1'></div>
<div class='ball_2'></div>
</div>
<div class='norse'></div>
<div class='mouth'></div>
<div class='lianjia_left'></div>
<div class='lianjia_right'></div>
</div>
</body>
</html>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)