CSS打字效果
AI 概述
纯 CSS 实现打字效果,效果如下:
HTML 代码:
<div class="wrapper">
<div class="typing-demo">
码云笔记关注于前端开发的技术博客
</div>
</div>
CSS 代码:
.wrapper {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.typi...
纯 CSS 实现打字效果,效果如下:

HTML 代码:
<div class="wrapper">
<div class="typing-demo">
码云笔记关注于前端开发的技术博客
</div>
</div>
CSS 代码:
.wrapper {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.typing-demo {
width: 22ch;
animation: typing 2s steps(22), blink .5s step-end infinite alternate;
white-space: nowrap;
overflow: hidden;
border-right: 3px solid;
font-family: monospace;
font-size: 2em;
}
@keyframes typing {
from {
width: 0
}
}
@keyframes blink {
50% {
border-color: transparent
}
}
以上关于CSS打字效果的文章就介绍到这了,更多相关内容请搜索码云笔记以前的文章或继续浏览下面的相关文章,希望大家以后多多支持码云笔记。

微信
支付宝