js+css实现文字横向分割显示动画效果代码
代码语言:html
所属分类:动画
代码描述:js+css实现文字横向分割显示动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
background-color: #545454; /* Dark grey */
margin: 0;
padding: 0;
position: relative;
overflow: hidden;
justify-content: center;
align-items: center;
text-align:center;
}
.black-line {
position: absolute;
height: 22px;
width: 100%;
background-color: black;
color: white;
white-space: nowrap;
transform: translateX(100vw);
}
.words {
position: absolute;
top: 180px; /* too hard to do with % or ems */
height: 85px;
width: 100%;
}
.word-line{
font-size: 85px;
font-family: Arial, sans-serif;
font-weight: bold;
margin: 0;
padding: 0;
color: white;
height: 85px;
position: absolute;
width: 100%;
background-color: transparent;
white-space: nowrap;
transform: translateX(100vw);
}
/*odd numbers first*/
#line1 {animation: slideIn 2s forwards .5s, waitawhile 3s forwards 10s, slideOut 1s forwards 9.5s;}
#line9{/*goes with 9a*/
animation: slideIn 2s forwards 3s, waitawhile 3s forwards 10s, slideOut 1s forwards 11s,slideBack 2s forwards 13s;
}
#line10{/*goes with 9b*/
animation: slideIn 2s forwards 4s, waitawhile 3s forwards 10s;
}
#line11{/*goes with 9c.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0