![](/img/trans.png)
[英]How can I make an HTML box slide on hover and reveal the text underneath it using JS or CSS
[英]How can I make a writing animation(change of text) on a users hover with HTML, CSS, and JS, just without the caret
這適用於一行。 唯一的問題是它不換行文本。
.typewriter { width: fit-content; } .typewriter div { overflow: hidden; white-space: nowrap; margin: 0 auto; letter-spacing: .05em; animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite; } @keyframes typing { from { width: 0 } to { width: 100% } }
<div class = 'typewriter'> <div> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.