css实现文字四种滚动动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现文字四种滚动动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--color: #F1DF40;
--color-b: #625AEE;
}
html {
height: 100%;
}
body {
margin: 0;
background-color: #384052;
height: 100%;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
align-items: center;
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
justify-content: center;
-ms-flex-pack: center;
font-family: 'Helvetica Neue', Arial;
font-size: 18px;
letter-spacing: 3.3px;
font-weight: bold;
}
.container {
position: relative;
width: 100%;
max-width: 1400px;
margin: 0 auto;
padding: 0 30px;
box-sizing: border-box;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
flex-wrap: wrap;
}
.box {
position: relative;
display: inline-block;
box-sizing: border-box;
width: 20%;
padding-bottom: 20%;
margin: 0 2.5%;
background-color: var(--color-b);
}
.box--1 span {
font-size: 1em;
display: inline-block;
text-align: center;
width: 100%;
-moz-animation: marquee 4s linear infinite;
-webkit-animation: marquee 4s linear infinite;
animation: marquee 4s linear infinite;
}
.box--1 span:nth-child(1) {
position: absolute;
left: -100%;
-moz-animation: marquee 4s 2s linear infinite;
-webkit-animation: marquee 4s 2s linear infinite;
animation: marquee 4s 2s linear infinite;
}
.box--1 .line {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 34px;
overflow: hidden;
white-space: nowrap;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0