html - 从右到左无限滚动css,React
问题描述
.marquee {
height: 100%;
width:100%;
overflow: hidden;
position: relative;
}
.marqueeContentContainer {
display:flex;
flex-direction:row;
align-items:center;
justify-content: space-evenly;
height: 100%;
-moz-animation: scroll-left 20s linear infinite;
-webkit-animation: scroll-left 20s linear infinite;
animation: scroll-left 20s linear infinite;
}
.marqueeContentContainer2 {
display:flex;
flex-direction:row;
align-items:center;
justify-content: space-evenly;
height: 100%;
-moz-animation: scroll-left 20s linear infinite;
-webkit-animation: scroll-left 20s linear infinite;
animation: scroll-left 20s linear infinite;
animation-delay: 10s;
}
@keyframes scroll-left {
0% {
transform: translate(100%, 0);
}
100% {
transform: translate(-100%, 0);
}
}
<div class='marquee'>
<div class='marqueeContentContainer'>
<p>Hi</p>
<p>Hi</p>
<p>Hi</p>
<p>Hi</p>
<p>Hi</p>
</div>
<div class='marqueeContentContainer2'>
<p>Hi</p>
<p>Hi</p>
<p>Hi</p>
<p>Hi</p>
<p>Hi</p>
</div>
</div>
我正在尝试为股票提要创建一个无限滚动,但无法将它们并排放置。这是我目前拥有的,它的代码。
所以你可以看到两个容器是如何在彼此下方的,但在时间方面是正确的
解决方案
推荐阅读
- sql - 将结果放入一组 2 或我指定的任何数字
- neo4j - 如何通过过滤(Neo4j,Cypher)通过多种关系类型匹配所有可能的路径
- rest - 在 REST GET 请求中传递大量数据
- mysql - 为什么我不能在 MySQL 中使用 FAST_FORWARD 数据库游标?
- javascript - 使用 `.every` 数组方法如何编写一个函数来确定数组中的每个数字是否都是平方数?
- swift - 等待布尔值“真”的更优雅的方式
- python - 为什么在张量板上没有这个 DNN 二元分类器 tf.estimator 模型的评估图?
- javascript - 如何在不影响子元素的情况下删除文本?
- python - QAction 可以用于多个任务吗?
- c++ - Fusion有尾部功能吗?