我正在寻找一个解决方案的“打字效果”动画的文本列表。
一个很好的类型化效果示例插件@Paulund
http://www.paulund.co.uk/playground/demo/typing-effect/
.css-typing
{
width: 30em;
white-space:nowrap;
overflow:hidden;
-webkit-animation: type 5s steps(50, end);
animation: type 5s steps(50, end);
}
@keyframes type{
from { width: 0; }
}
@-webkit-keyframes type{
from { width: 0; }
}<p>We offer<span class="css-typing">Item 1 to Item 3</span> at low cost prices</p>
我如何让它循环通过一个列表的项目,以键入?注意:我希望以前的项目消失,所以一次只有一个项目。
我们向.提供低成本的价格
将.替换为以下内容,并在输入效果中写入,循环遍历它们。
发布于 2015-08-28 18:08:49
在这里,Span标签不起作用,您可以使用另一个标记。
.offer{
width: 100%;
display: block;
float: left;
list-style:none;
}
li {
float: left;
width: 100%;
}
p {
float: left;
}
.css {
width: 46px;
/* float: left; */
white-space: nowrap;
overflow: hidden;
-moz-animation-duration: 5s;
-webkit-animation-duration: 5s;
-moz-animation-name: slidein;
-webkit-animation-name: slidein;
}
@-moz-keyframes slidein {
from {
width:1px;
}
to {
width:46px;
}
}
@-webkit-keyframes slidein {
from {
width:1px;
}
to {
width:46px;
}
}<ul class="offer">
<li><p> We offer:</p><p class="css">Item 1</p><p> at low cost prices</p></li>
<li><p> We offer:</p><p class="css">Item 1</p><p> at low cost prices</p></li>
<li><p> We offer:</p><p class="css">Item 1</p> <p>at low cost prices</p></li>
</ul>
https://stackoverflow.com/questions/32275530
复制相似问题