纯css布局实现风车动画效果
代码语言:html
所属分类:动画
代码描述:纯css布局实现风车动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { background: #292f4c; } .canvas { height: 340px; width: 340px; border: 10px solid #3b436d; border-radius: 50%; margin: 10% auto; position: relative; background: linear-gradient(to bottom, #4d4d83 0%, #c76961 246px, #292f4c 0%); overflow: hidden; } .sun { position: absolute; height: 112px; width: 112px; background: linear-gradient(to bottom, #ffc673 0%, #ff653c 100%); left: 36px; top: 70px; border-radius: 50%; } .forest { bottom: -8px; position: absolute; } .tree { width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-bottom: 48px solid #292f4c; position: absolute; bottom: 80px; } .tree.tree1 { left: 22px; bottom: 70px; } .tree.tree2 { left: 42px; } .tree.tree3 { bottom: 62px; left: 60px; } .tree.tree4 { left: 74px; bottom: 64px; } .tree.tree5 { left: 90px; bottom: 72px; } .tree.tree6 { left: 120px; } .tree.tree7 { left: 140px; } .tree.tree8 { left: 160px; } .tree.tree9 { left: 190px; } .tree.tree10 { left: 205px; bottom: 60px; } .tree.tree11 { left: 220px; bottom: 70px; } .tree.tree12 { bottom: 80px; left: 240px; } .tree.tree13 { left: 260px; bottom: 70px; } .tree.tree14 { left: 280px; bottom: 60px; } .floors { height: 100px; width: 74px; background: #292f4c; left: 10%; position: absolute; bottom: 80px; } .floors:before { position: absolute; content: ""; width: 0; height: 0; border-left: 11px solid transparent; border-right: 0px solid transparent; border-bottom: 100.........完整代码请登录后点击上方下载按钮下载查看
网友评论0