输入文本自动朗读特效

代码语言:html

所属分类:多媒体

代码描述:输入文本自动朗读特效

代码标签: 朗读 特效

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


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

<link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Lilita+One&amp;display=swap'>
<style>
body {
  padding: 0;
  margin: 0;
  font-family: "Lilita One", sans-serif;
}

.word {
  position: relative;
  background: #e5f7ff;
  display: -webkit-box;
  display: flex;
  -webkit-box-pack: center;
          justify-content: center;
  -webkit-box-align: center;
          align-items: center;
  height: 100vh;
  width: 100vw;
  font-size: 20vw;
  text-transform: uppercase;
  overflow: hidden;
  text-align: center;
  line-height: 1;
}

input {
font-size: 1rem;
  width:1rem;
}

.word:after {
  content: " ";
  background: rgb(255, 255, 255);
  display: inline-block;
  width: 0.1em;
  height: .75em;
  -webkit-animation: flash 0.5s alternate infinite;
          animation: flash 0.5s alternate infinite;
  margin: 0 0.1em;
  position: relative;
}

.letter {
  position: relative;
  display: inline-block;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-stroke: .05em white;
  -webkit-text-fill-color: transparent;
  -webkit-filter: drop-shadow(0.4vh 0.4vh 0.4vh rgba(0, 0, 0, 0.3));
          filter: drop-shadow(0.4vh 0.4vh 0.4vh rgba(0, 0, 0, 0.3));
  -webkit-animation-duration: 0.2s;
          animation-duration: 0.2s;
  -webkit-animation-name: slidein;
          animation-name: slidein;
  background-size: 75px 75px;
  background-repeat: repeat;
  min-width: 0.2em;
  z-index: 1;
}

@-webkit-keyframes slidein {
  from {
    -webkit-transform: scale(2.5) rotate(10deg);
            transform: scale(2.5) rotate(10deg);
  }

  to {
    -webkit-transform: scale(1) rotate(0deg);
            transform: scale(1) rotate(0deg);
  }
}

@keyframes slidein {
  from {
    -webkit-transform: scale(2.5) rotate(10deg);
            transform: scale(2.5) rotate(10deg);
  }

  to {
    -webkit-transform: scale(1) rotate(0deg);
            transform: scale(1) rotate(0deg);
  }
}

@-webkit-keyframes flash {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes flash {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Hiding this as my daughter doesn't need to change voices */
.voices {
  position: absolute;
  top: 1em;
  left: 1em;
  opacity: 0;
}

.instructions {
  position: fixed;
  bottom: 0.5em;
  text-align: center;
  width: 100%;
  .........完整代码请登录后点击上方下载按钮下载查看

网友评论0