div+css绘制雪人效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css绘制雪人效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { height: 100vh; overflow: hidden; position: relative; background-color: lightskyblue; text-align: center; } div { position: absolute; left: 50%; top: 50%; transform:translate(-50%,-50%); } .face { width: 200px; height: 150px; background:white; top: 40%; border-radius: 46% 57% 65% 32% / 76% 59% 42% 26%; } .eye1 { width: 15px; height: 15px; background: black; top: 35%; left: 40%; border-radius: 50%; } .eye2 { width: 15px; height: 15px; background: black; top: 30%; left: 60%; border-radius: 50%; } .blush1 { width: 30px; height: 30px; background: pink; top: 40%; left: 70%; border-radius: 50%; transform: rotate(90deg); } .blush2 { width: 30px; height: 30px; background: pink; top: 40%; left: 25%; border-radius: 50%; transform: rotate(90deg); } .nose { width: 25px; height: 80px; background: orange; top: 12%; left: 63%; transform: rotate(50deg); border-radius: 50% 50% 40% 40% / 100% 100% 10% 10%; z-index: 2; } .teeth1 { width: 30px; height: 30px; background: white; top: 125%; left: 30%; z-index: -1; border-radius: 5px; } .teeth2 { width: 30px; height: 30px; background: white; top: 125%; left: 70%; z-index: -1; border-radius: 5px; } .body { width: 250px; height: 250px; background: white; top: 150%; border-radius: 40% 30% 30% 70% / 60% 40% 60% 40%; z-index: -1; } .feet1 { width: 100px; height: 80px; background: white; top: 200%; transform: rotate(30deg); left: -10%; border-radius: 50% 50% 59% 66% / 36% 65% 38% 65%; z-index: -1; } .feet2 { width: 100px; height: 80px; background: white; top: 200%; transform: rotate(-30deg); left: 60%; border-radius: 50% 50% 59% 66% / 36% 65.........完整代码请登录后点击上方下载按钮下载查看
网友评论0