html - 绝对位置上的打字机动画问题
问题描述
我的打字机动画效果遇到问题我在文本上使用绝对位置,如果我删除绝对位置,这会让动画从右向左滑动而不输入,它工作正常,我怎样才能在不删除的情况下解决这个问题位置样式,因为如果我删除它,它不会粘在它的位置?
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12 home-middle">
<div class="book-overlay">
<img class="book" src="assets/images/home-book.png" />
<div class="asd">
<h5 class="outline-text-1 type-effect">Best Support.</h5>
<h5 class="outline-text-2 type-effect">Best Features.</h5>
<h5 class="outline-text-3 type-effect">Safest of them all.</h5>
<h5 class="outline-text-4 type-effect">Affordable.</h5>
<h5 class="outline-text-5 type-effect">Undetectable.</h5>
</div>
</div>
</div>
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
.outline-text-5 {
position: absolute;
top: 87%;
right: 6.5%;
white-space: nowrap;
overflow: hidden;
animation:
typing 3.5s steps(60, end);
}
解决方案
推荐阅读
- android - 企业内部的管理 API 和应用程序分发
- javascript - Javascript curl 等价物
- c# - 如何加密和解密多个文件到一个文件?
- google-api - 从另一个 Google Doc 更新 Google Doc 的内容而不创建新文件
- python - AttributeError:Django、Python 中的模块
- java - onCreate() 方法被跳过
- javascript - 从 Hypercube Qlik Sense 混搭中选择尺寸
- traefik - 如果后端服务器在 VPN 后面,则网关错误
- rest - 来自带有 rest-connector 的远程方法的意外响应
- mysql - sql查询在node.js mysql上不起作用,但在终端上起作用