js实现幽灵打字消失效果代码

代码语言:html

所属分类:动画

代码描述:js实现幽灵打字消失效果代码

代码标签: 打字 消失 效果

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

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

<head>

  <meta charset="UTF-8">

  
  <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&amp;display=swap'>
  
<style>
/* General */
body {
  margin: 0;
  background: #0C0C0C;
  color: #f2f2f2;
  font-family: 'IBM Plex Mono', monospace;
}

main {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.deactivated {
  display: none;
}

/* Intro Animation */
#intro {
  position: absolute;
  width: 20vw;
  height: 20vw;
}

#intro.fade path, #intro.fade polyline {
  stroke: #0C0C0C !important;
  transition: stroke 500ms ease-in;
}

#intro.fade circle {
  fill: #0C0C0C !important;
  transition: fill 500ms ease-in;
}

/* Info */
.title {
  position: absolute;
  left: 32px;
  top: 8px;
}

#show {
  position: absolute;
  right: 32px;
  bottom: 8px;
}

#clear {
  position: absolute;
  left: 32px;
  bottom: 8px;
}

/* Console */
#hosaka {
  width: 70%;
  height: 70%;
  perspective: 10px;
  font-size: 1.5em;
}

#hosaka span {
  transition: all 500ms.........完整代码请登录后点击上方下载按钮下载查看

网友评论0