纯css实现电影大白的卡通形象效果
代码语言:html
所属分类:动画
代码描述:纯css实现电影大白的卡通形象效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
.cc, #baymax, #baymax .head, #baymax .head .mouth, #baymax .body, #baymax .body .chest, #baymax .body .chest i, #baymax .body .chest i:before, #baymax .body .belly {
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
position: absolute;
}
html, body {
position: absolute;
overflow: hidden;
height: 100%;
width: 100%;
background-color: white;
}
body {
background-color: rgba(176, 0, 2, 0.8);
}
#baymax {
cursor: pointer;
top: 50%;
left: 50%;
}
#baymax .head {
z-index: 10;
top: -120px;
left: 50%;
border-radius: 50%;
width: 90px;
height: 60px;
background-color: white;
box-shadow: 0 -15px 30px rgba(23, 34, 45, 0.2) inset, 0 5px 15px rgba(23, 34, 45, 0.2);
}
#baymax .head .eye, #baymax .head .mouth {
position: absolute;
display: inline-block;
}
#baymax .head .eye {
animation: blink 6s ease-in-out infinite;
margin-top: -4.5px;
background-color: #202b36;
border-radius: 50%;
width: 8.1px;
height: 9px;
top: 40%;
left: 50%;
}
#baymax .head .eye.left {
margin-left: -24.5px;
}
#baymax .head .eye.right {
margin-left:.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0