css实现一个冒泡动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现一个冒泡动画效果代码

代码标签: 冒泡 动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
  
<style>
body {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.kettle {
  position: relative;
}
.kettle .bubble, .kettle .bubble2, .kettle .bubble3, .kettle .bubble4 {
  position: absolute;
  bottom: 200px;
  display: block;
  border-radius: 200px;
  background: gradient(radial, center center, 0, center center, 100, from(rgba(29, 65, 239, 0.2)), to(rgba(255, 255, 255, 0.7)));
  animation: bubbleFloat 5s infinite;
}
.kettle .bubble .glow, .kettle .bubble2 .glow, .kettle .bubble3 .glow, .kettle .bubble4 .glow {
  width: 100%;
  height: 100%;
  background-image: radial-gradient(#00adff, #45c4ff, transparent);
  position: relative;
  display: block;
  border-radius: 200px;
  animation: redPulse 2s infinite;
}
.kettle .bubble {
  width: 100px;
  height: 100px;
  left: 120px;
  animation-delay: 0.5s;
}
.kettle .bubble2 {
  width: 80px;
  height: 80px;
  left: 120px;
  animation-delay: 1s;
}
.kettle .bubble3 {
  width: 40px;
  height: 40px;
  left: 150px;
  animation-delay: 1.5s;
}
.kettle .bubble4 {
  width: 20px;
  height: 20px;
  left: 190px;
  animation-delay: 2s;
}
.kettle img {
  filter: brightness(100%) contrast(100%) drop-shadow(8px 8px 10px gray) grayscale(10%) hue-rotate(45deg) invert(100%);
}

@-webkit-keyframes bubbleFloat {
  from {
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0