<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box1{
width: 1em;
height: 1.5em;
overflow: hidden;
/* background-color: pink; */
animation: type 2s steps(4) forwards;
}
@keyframes type {
0%{
width: 0;
}
100%{
width: 4em;
}
}
</style>
</head>
<body>
<div class="box1">
你好春天
</div>
</body>
</html>
【css】打字机效果,纯css
猜你喜欢
转载自blog.csdn.net/weixin_56105633/article/details/127892546
今日推荐
周排行