js实现文字生成语音与骷颅人物嘴巴说话动画效果代码
代码语言:html
所属分类:其他
代码描述:js实现文字生成语音与骷颅人物嘴巴说话动画效果代码
代码标签: js 文字 生成 语音 骷颅 人物 嘴巴 说话 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css?family=Finger+Paint" rel="stylesheet"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body{ overflow:hidden; /*font-family: 'Bai Jamjuree', sans-serif;*/ font-family: 'Finger Paint', cursive; } .full-screen { background-image: radial-gradient(firebrick, #060606); width: 100vw; height: 100vh; z-index: -100; margin-left:-8px; cursor:crosshair; } #searchBox{ padding:1em; height:10px; background-color:#fff; position:fixed; z-index:60; width:100%; top:0; left:0; box-shadow:0 4px 12px rgba(0,0,0,.1),0 4px 24px rgba(0,0,0,.2); font-family: 'Finger Paint', cursive; } #search{ border:1px solid rgba(0,0,0,.1); border-radius: 6px; width: 100%; padding: 12px 16px; font-size:1em; } #userInputYo{ background: rgba(255,255,255,0.3); border: none; padding:5px; margin-top:5px; border-radius:5px; width:70vw; box-shadow:0px 1px 10px grey; text-align:center; top:1%; left:50%; z-index:11; position:absolute; transform:translate(-50%, 0%); height:1.3em; font-family: 'Finger Paint', cursive; } .eyeArea { position:relative; z-index:5; transform:translate(-50%,-50%); left:50%; top:25%; width:100%; height:50%; } .eye { position:absolute; background: #000000; /*border: 1.2vw solid rgb(255,255,255);*/ border-radius: 50%; height: 10vw; width: 10vw; margin-left:-70%; margin-top:70%; max-height:100px; max-width:100px; box-shadow:3px 0px 1px rgb(0,0,0,0.3); } .eye:after { background: firebrick; /*border-radius: 50%;*/ bottom: 52%; content: " "; height: 33%; position: absolute; right: 3.33vw; width: 3.33vw; max-height:33.3px; max-width:33.3px; } .eye:hover:after { -webkit-transition: bottom 1s; /* Safari */ transition: bottom 0.5s; bottom: 33%; } .eeye:before { /*twinkle in the eye: not used*/ background: white; /*border-radius: 50%;*/ bottom: 60%; content: " "; height: 13%; position: absolute; right: 3.93vw; width: 1.33vw; max-height:13.3px; max-width:13.3px; z-index:6; } .eye:active{ background:linear-gradient( 0deg, white, white 47%, black 47%, black 53%, white 53% ); transform:rotate(90deg);/*This does nothing. Go figure.*/ } .eye:active:after{ background: rgba(0, 0, 0, 0); } .eye2 { position:relative; margin-left:70%; margin-top:40%; background: #000000; left:0vw; /*border: 1.2vw solid rgb(255,255,255);*/ border-radius: 50%; height: 10vw; width: 10vw; top:23%; max-height:100px; max-width:100px; box-shadow:3px 0px 1px rgb(0,0,0,0.3); } .eye2:after { background: firebrick; /*border-radius: 50%;*/ bottom: 52%; content: " "; height: 3.33vw; position: absolute; right: 33%; width: 3.33vw; max-height:33.3px; max-width:33.3px; } .eye2:hover:after { -webkit-transition: bottom 1s; /* Safari */ transition: bottom 0.5s; bottom: 33%; } .eeye2:before { /*twinkle in the eye*/ background: white; /*border-radius: 50%;*/ bottom: 60%; content: " "; height: 13%; position: absolute; right: 3.93vw; width: 1.33vw; max-height:13.3px; max-width:13.3px; z-index:6; } .eye2:active{ background:linear-gradient( 0deg, white, white 47%, black 47%, black 53%, white 53% ); } .eye2:active:after{ background: rgba(0, 0, 0, 0); } .skel { width: 25vw; position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); z-index: 20; opacity:0.4; } .skelArea { position: absolute; top: 55%; left: 50%; transform: translate(-50%, -50%); height:50vw; max-height:400px; max-width:400px; display:inline-block; } .skelBody { pos.........完整代码请登录后点击上方下载按钮下载查看
网友评论0