div+css布局实现一个招财猫动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css布局实现一个招财猫动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { background-color: darkslategrey; } .wrapper { display: flex; width: 100%; height: 100%; margin-top: 20px; flex-direction: column; justify-content: center; align-items: center; } .container { position: relative; width: 340px; display: flex; justify-content: space-between; flex-direction: column; /* transform: scale(0.5); */ } .ears { display: flex; width: 100%; justify-content: space-between; } .ear-left-out { height: 110px; width: 110px; border: solid 8px black; background-color: white; border-radius: 26% 74% 72% 28% / 28% 38% 62% 72%; position: relative; transform: rotate(3deg); } .ear-left-inner { height: 60px; position: absolute; top: 30px; left: 30px; width: 60px; background-color: #DF4A63; border-radius: 26% 74% 72% 28% / 28% 38% 62% 72%; border: solid 8px black; } .ear-right-out { height: 110px; width: 110px; border: solid 8px black; background-color: white; border-radius: 26% 74% 72% 28% / 28% 38% 62% 72%; position: relative; transform: rotate(84deg); } .ear-right-inner { height: 60px; position: absolute; top: 30px; right: 30px; width: 60px; background-color: #DF4A63; border-radius: 26% 74% 72% 28% / 28% 38% 62% 72%; transform: rotate(88deg); border: solid 8px black; } .head { height: 250px; width: 300px; top: 10px; left: 10px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40% ; border: solid 8px black; background-color: white; position: absolute; z-index: 2; } .eyes { display: flex; justify-content: space-around; padding-top: 85px; height: 35px; } .eye-left::after { content: ' '; position: absolute; height: 12px; display: inline-block; width: 12px; left: 1px; top: 0px; background-color: black; border-radius: 61%; } .eye-left::before { content: ' '; position: absolute; height: 12px; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0