svg试管冒泡动画效果

代码语言:html

所属分类:动画

代码描述:试管冒泡动画效果,通过svg结合js实现

代码标签: 动画 效果

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
:root {
  --primary: #a231ff;
  --primary-dark: #6a22d6;
  --grey-light: #F5F6FA;
  --grey: #645c6b;
  --white: #ffffff;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  font-size: 62.5%;
  overflow-y: scroll;
}

.container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--grey-light);
}

.test-tube {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.line-top {
  height: .6rem;
  width: 10rem;
  margin-bottom: -.6rem;
  background: var(--grey);
  z-index: 500;
  position: relative;
}
.line-top::before, .line-top::after {
  content: '';
  position: absolute;
  height: .6rem;
  width: 1.4rem;
  background: var(--grey);
  top: 2.4rem;
  border-radius: 1rem;
}
.line-top::before {
  left: -.4rem;
}
.line-top::after {
  left: 9rem;
}
.line-top__line1, .line-top__line2 {
  position: absolute;
  top: 12rem;
  left: 1.8rem;
  height: 10rem;
  width: .6rem;
  background: var(--white);
  opacity: ..........完整代码请登录后点击上方下载按钮下载查看

网友评论0