css绘制一个复仇者联盟卡通人物效果代码
代码语言:html
所属分类:布局界面
代码描述:css绘制一个复仇者联盟卡通人物效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
@import url(https://fonts.googleapis.com/css?family=Lato:300);
*, *:before, *:after {
box-sizing: border-box;
}
body {
font-size: 16px;
position: absolute;
width: 100%;
height: 100%;
font-family: 'Lato', sans-serif;
}
.wrapper {
position: relative;
width: 550px;
height: 365px;
margin: 15% auto;
-webkit-animation: shake 7s infinite;
animation: shake 7s infinite;
}
.hulk {
position: absolute;
margin-left: 200px;
bottom: 0px;
margin-bottom: 300px;
}
.hulk .head {
width: 4.713em;
position: absolute;
margin-top: -2.75em;
margin-left: 3.563em;
border-bottom: 3.75em solid #bdbd00;
border-left: 0.938em solid transparent;
border-right: 0.938em solid transparent;
height: 0;
z-index: 10;
}
.hulk .head::after {
content: "";
width: 2.25em;
height: 0.375em;
position: absolute;
margin-top: 0.538em;
margin-left: 0.313em;
background: #034600;
}
.hulk .head::before {
content: "";
width: 3.25em;
height: 0.75em;
position: absolute;
margin-top: -0.75em;
margin-left: -0.25em;
background: #034600;
border-top-left-radius: 1.875em;
border-top-right-radius: 1.875em;
}
.hulk .mouth {
width: 31px;
height: 0px;
position: absolute;
margin-top: 25px;
margin-left: 8px;
overflow: hidden;
background-image: linear-gradient(to bottom, #ffffff, #ffffff 25%, #4b0a00 25%, #4b0a00 70%, #ffffff 75%, #ffffff 100%);
border-top-left-radius: 0.5em;
border-top-right-radius: 0.5em;
-webkit-animation: mouthOpen 7s infinite;
animation: mouthOpen 7s infinite;
}
.hulk .mouth::before {
content: "";
width: 10px;
height: 7px;
position: absolute;
background: #902e2b;
margin-top: 9px;
margin-left: 11px;
border-top-left-radius: 0.5em;
border-top-right-radius: 0.5em;
}
.hulk .right-arm {
width: 13.313em;
height: 13.75em;
margin-top: 1em;
margin-left: 2em;
border-radius: 50%;
background: #b5b500;
position: absolute;
clip: rect(-1em, 11.2em, 12.55em, 7.625em);
-webkit-animation: hulkRightarm 7s infinite;
animation: hulkRightarm 7s infinite;
}
.hulk .right-arm::after {
content: "";
width: 12.063em;
height: 9.625em;
border-radius: 50%;
background: white;
position: absolute;
transform: translateY(1.25em);
margin-left: -3.313em;
}
.hulk .left-arm {
width: 13.313em;
height: 13.75em;
margin-top: 1em;
margin-left: -4.3em;
border-radius: 50%;
background: #949400;
position: absolute;
clip: rect(-0.188em, 6.1em, 13.875em, 2.3em);
-webkit-animation: hulkLeftarm 7s infinite;
animation: hulkLeftarm 7s infinite;
}
.hulk .left-arm::after {
content: "";
width: 12.063em;
height: 9.625em;
border-radius: 50%;
background: white;
position: absolute;
transform: translateY(1.25em);
margin-left: 4.563em;
}
.hulk .fist {
width: 4.375em;
height: 4.375em;
position: absolute;
border-radius: 50%;
margin-top: 11.7em;
margin-left: -2.1em;
background: #949400;
box-shadow: 11.1em 0 0 #b5b500;
z-index: 10;
-webkit-animation: hulkHands 7s infinite;
animation: hulkHands 7s infinite;
}
.hulk .body {
width: 12.5em;
height: 12.5em;
background: #bdbd00;
border-radius: 50%;
position: absolute;
box-shadow: inset 1.125em 0 0 #a4a400, -0.938em 0 0 #8a8a00;
z-index: 10;
}
.hulk .body::before {
content: "";
width: 0.75em;
height: 0.75em;
border-radius: 50%;
position: absolute;
margin-top: 3.125em;
margin-left: 1.375em;
background: #8a8a00;
box-shadow: 7.625em 0 0 #8a8a00;
}
.hulk .body::after {
content: "";
position: absolute;
width: 0.313em;
height: 0.313em;
border-radius: 50%;
margin-top: 10em;
margin-left: 5.625em;
background: #8a8a00;
box-shadow: 0 2.625em 0 #9ac7f1;
}
.hulk .right-leg {
width: 0.625em;
height: 6.438em;
position: absolute;
margin-left: 4.25em;
margin-top: 12.3em;
background-image: linear-gradient(to bottom, #2e0e62, #2e0e62 50%, #575700 50%, #575700 100%);
-webkit-animation: hulkPants2 7s infinite;
animation: hulkPants2 7s infinite;
}
.hulk .right-leg::after {
content: "";
width: 0.938em;
height: 0.875em;
position: absolute;
margin-left: 0.625em;
background: #43158e;
}
.hulk .right-leg::before {
content: "";
width: 1.125em;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0