css+TweenMax实现三维小狗狗盯着鼠标移动效果代码
代码语言:html
所属分类:三维
代码描述:css+TweenMax实现三维小狗狗盯着鼠标移动效果代码
代码标签: css TweenMax 三维 小狗 狗 盯着 鼠标 移动
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { position: relative; width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; background: radial-gradient(circle at center, #f2fcfe -20%, #1c92d2); background: -webkit-radial-gradient(circle at center, #f2fcfe -20%, #1c92d2); overflow: hidden; } body .body { position: absolute; width: 175px; height: 275px; left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%) scale(0.5); perspective: 500px; margin-top: -25px; z-index: 1; } body .body .paw { position: absolute; width: 70px; height: 40px; background: #5c3f22; bottom: -130px; z-index: 4; left: -90px; background: linear-gradient(to bottom, #5c3f22, #5c3f22 20%, rgba(255, 255, 255, 0) 5%), linear-gradient(to right, #5c3f22, #5c3f22 20%, #49321b 20%, #49321b 26%, #5c3f22 26%, #5c3f22 69%, #49321b 69%, #49321b 75%, #5c3f22 75%); } body .body .paw.first { background: linear-gradient(to bottom, #f2eae8, #f2eae8 20%, rgba(255, 255, 255, 0) 20%), linear-gradient(to right, #f2eae8, #f2eae8 20%, #cdafa7 20%, #cdafa7 26%, #f2eae8 26%, #f2eae8 69%, #cdafa7 69%, #cdafa7 75%, #f2eae8 75%); right: auto; left: -40px; z-index: 9; width: 60px; } body .body .paw.second { background: linear-gradient(to bottom, #f2eae8, #f2eae8 20%, rgba(255, 255, 255, 0) 20%), linear-gradient(to right, #f2eae8, #f2eae8 20%, #cdafa7 20%, #cdafa7 26%, #f2eae8 26%, #f2eae8 69%, #cdafa7 69%, #cdafa7 75%, #f2eae8 75%); left: auto; right: -40px; width: 60px; } body .body .paw:nth-of-type(4) { left: auto; right: -90px; z-index: 0; background: linear-gradient(to bottom, #5c3f22, #5c3f22 20%, rgba(255, 255, 255, 0) 5%), linear-gradient(to right, #5c3f22, #5c3f22 20%, #120c06 20%, #49321b 26%, #5c3f22 26%, #5c3f22 69%, #49321b 69%, #49321b 75%, #5c3f22 75%); } body .body .paw:nth-of-type(5) { left: -80px; height: 120px; z-index: -1; background: #53391f; } body .body .paw:nth-of-type(6) { left: auto; right: -80px; height: 120px; z-index: -1; background: #53391f; } body .body:before { content: ""; position: absolute; width: 120px; height: 80px; top: 130px; left: 20px; z-index: 1; background: #003e7e; border-radius: 0 0 150px 150px/0 0 50px 50px; } body .body .inner { position: absolute; width: 175px; height: 475px; border-radius: 0 0 150px 150px/0 0 275px 275px; background: linear-gradient(to right, #5c3f22, #5c3f22 10%, #e9dbd8 10%, #e9dbd8 90%, #5c3f22 90%); background: radial-gradient(ellipse at center, #e9dbd8, #e9.........完整代码请登录后点击上方下载按钮下载查看
网友评论0