div+css实现气泡上浮动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现气泡上浮动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box } .kuang { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -10; background-image: linear-gradient(180deg,#4ea8f1,#255bf1) } .bubble { position: absolute; border-radius: 50%; border: 2px solid #fff; box-shadow: inset 0 0 8px #fff; animation: flutter 10s infinite; opacity: 0 } @keyframes flutter { 0% { transform: translateX(0); bottom: -100px; opacity: 1 } 50% { transform: translateX(100px); opacity: .5 } 100% { transform: translateX(0px); bottom: 100%; opacity: 0 } } .bubble:nth-child(1) { left: -10%; width: 50px; height: 50px; animation-duration: 9s; animation-delay: .1s } .bubble:nth-child(2) { left: 15%; width: 20px; height: 20px; animation-duration: 6s; animation-delay: 1.5s } .bubble:nth-child(3) { left: 20%; width: 60px; height: 60px; animation-duration: 10s } .bubble:nth-child(4) { left: 30%; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0