css实现挥手眨眼睛雪人效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现挥手眨眼睛雪人效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; } body { height: 100vh; width: 100vw; background: #b3d3c3; display: flex; flex-direction: column; justify-content: center; align-items: center; } .snowman { position: relative; background: linear-gradient( 166deg, rgba(255, 255, 255, 1) 78%, rgba(248, 244, 238, 1) 88% ); height: 23vmin; width: 25vmin; border-radius: 48% 52% 51% 49% / 53% 53% 47% 47%; top: 9vmin; } .snowman::after { position: absolute; content: ""; background: linear-gradient( 166deg, rgba(255, 255, 255, 1) 78%, rgba(248, 244, 238, 1) 88% ); height: 20vmin; width: 25vmin; border-radius: 48% 52% 51% 49% / 58% 59% 41% 42%; top: -13vmin; } .snowman::before { position: absolute; content: ""; background: #f4e8e1; height: 10vmin; width: 16vmin; border-radius: 48% 52% 51% 49% / 58% 59% 41% 42%; left: 4.5vmin; top: -2vmin; } .snowman-face { position: relative; background: #20313d; height: 2vmin; width: 2vmin; border-radius: 50%; top: -2vmin; left: 7vmin; box-shadow: 9vmin 0 #20313d; z-index: 1; animation: blink 6s infinite; } .snowman-face::after { position: absolute; content: ""; background: white; height: 0.4vmin; width: 0.4vmin; border-radius: 50%; left: 1.1vmin; top: 0.4vmin; box-shadow: 9vmin 0 white; } .snowman-nose { position: relative; background: #fa9b7d; height: 2.5vmin; width: 1.5vmin; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; left: 12.5vmin; top: -3vmin; transform: rotate(90deg); z-index: 1; } .snowman-nose::after { position: absolute; content: ""; border-top: 0.7vmin solid transparent; border-left: 2vmin solid #fa9b7d; border-bottom: 0.7vmin solid transparent; left: -0.25vmin; top: -0.9vmin; transform: rotate(-90deg); } .snowman-nose::before { position: absolute; content: ""; background: transparent; height: 1.5vmin; width: 1vmin; border-radius: 50% 60% 70% 40% / 50% 50% 60% 20%; border-right: 0.3vmin solid #d1b4ae; border-bottom: 0.3vmin solid #d1b4ae; top: 2.8vmin; left: 2vmin; transform: rotate(-10deg); } .but.........完整代码请登录后点击上方下载按钮下载查看
网友评论0