纯css绘制一对企鹅夫妇效果
代码语言:html
所属分类:布局界面
代码描述:纯css绘制一对企鹅夫妇效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { background: #005aa7; /* fallback for old browsers */ background: -webkit-linear-gradient(to bottom, #005aa7, #fffde4); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(to bottom, #005aa7, #fffde4); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } .flex, .outer-container, .outer-container .penguin-wrapper .penguin-back { display: flex; justify-content: center; } .eye-ball, .outer-container .penguin-wrapper .penguin-back .penguin-stomach-surface .penguin-face .eye-right::before, .outer-container .penguin-wrapper .penguin-back .penguin-stomach-surface .penguin-face .eye-left::before { content: ''; position: absolute; z-index: 2; width: 35%; height: 35%; border-radius: 50%; background: #FFF; top: 4px; left: 2px; } .blush, .outer-container .girl .eye-left::after, .outer-container .girl .eye-right::after { content: ''; position: absolute; width: 50%; height: 50%; z-index: 1001; box-shadow: 0 0 5px 5px pink; background: pink; border-radius: 50%; } .outer-container { position: relative; align-items: center; width: 100%; height: 100vh; } .outer-container .penguin-wrapper { position: relative; } .outer-container .penguin-wrapper .bow { position: relative; z-index: 100; width: 0; border-bottom-left-radius: 90%; border-top-left-radius: 90%; border-top-right-radius: 90%; border-bottom-right-radius: 90%; border-top: 15px solid transparent; border-left: 15px solid #E8509B; border-bottom: 15px solid transparent; border-right: 15px solid #E8509B; } .outer-container .penguin-wrapper .bow::before { content: ''; position: absolute; top: -4px; left: -3px; z-index: 10; width: 7px; height: 7px; border-radius: 50%; background: black; } .outer-container .penguin-wrapper .penguin-back { align-items: flex-end; position: relative; z-index: 30; padding-bottom: 10px; width: 150px; height: 190px; background: #000; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; } .outer-container .penguin-wrapper .penguin-back .penguin-stomach-surface { position: relative; width: 130px; height: 165px; background: #FFF; border-radius: 40% 40% 50% 50% / 60% 60% 50% 50%; } .outer-container .penguin-wrapper .penguin-back .penguin-stomach-surface::after, .outer-container .penguin-wrapper .penguin-back .penguin-stomach-surface::before { content: ''; position: absolute; z-index: -222; top: 25%; width: 18%; height: 40%; background: #000; border-radius: 90% 20% 90% 0%; } .outer-container .penguin-wrapper .penguin-back .penguin-stomach-surface::after { left: -14%; transform: rotate(25deg); animation: flip 1s infinite; } .outer-container .penguin-wrapper .penguin-back .penguin-stomach-surface::before { left: 96%; transform: rotate(-.........完整代码请登录后点击上方下载按钮下载查看
网友评论0