p5多圆环折叠运行动画效果

代码语言:html

所属分类:动画

代码描述:p5多圆环折叠运行动画效果

代码标签: 折叠 运行 动画 效果

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

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

<style>
body {
  margin: 0;
  overflow: hidden;
  display: flex;
  height: 100vh;
  background: black;
}

canvas {
  margin: auto;
  touch-action: none;
}

input {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: 80%;
  height: 34px;
  max-width: 400px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}
input:active {
  cursor: grabbing;
}
input::-webkit-slider-runnable-track {
  box-sizing: border-box;
  height: 6px;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}
input::-moz-range-track {
  box-sizing: border-box;
  height: 6px;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}
input::-ms-track {
  box-sizing: border-box;
  height: 6px;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}
input::-webkit-slider-thumb {
  margin-top: -12px;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid black;
  -webkit-appearance: none;
  appearance: none;
  cursor: grab;
}
input::-moz-range-thumb {
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid black;
  -webkit-appearance: none;
  appearance: none;
  cursor: grab;
}
input::-ms-thumb {
  margin-top: 0px;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid black;
  -webkit-appearance: none;
  appearance: none;
  cursor: grab;
}

section {
  box-sizing: border-box;
  font-size: 30px;
  color: white;
  position: fixed;
  left: 0;
  top: 20px;
  width: 100%;
  text-align: center;
  padding: 10px 10%;
  z-index: 10;
  pointer-events: none;
  text-shadow: 0 0 3px black, 0 0 4px black, 0 0 5px black;
  background: rgba(0, 0, 0, 0.7);
  font-family: 'Montserrat', sans-serif;
}
section p {
  margin: 0;
}
@media (max-width: 500px) {
  section {
    font-size: 24px;
  }
}

code {
  white-space: nowrap;
}
</style>

</head>
<body translate="no">
<input type="range" min="1" max="7" step="1" id="step" value="1">
<section>
<p>Draw a circle</p>
<p>Pick 6 evenly spaced points along the circle</p>
<p>Draw circles from each point with the same radius</p>
<p>Animate the radius of the inner circle</p>
<p>Increase the amount of petals and hid.........完整代码请登录后点击上方下载按钮下载查看

网友评论0