
在使用chatGPT的时候,会有一个打字机的效果,以下是分别使用原生Js和Vue实现
原生 JS 实现
如下是示例代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Printer 打字机效果</title>
<style>
* {
margin: 0;
border: 0;
padding: 0;
font-family: "Courier New", Courier, monospace;
}
#window {
width: 600px;
height: 400px;
background-color: black;
margin: 100px auto;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}
#title-bar {
width: 595px;
height: 20px;
line-height: 20px;
padding-left: 5px;
font-size: 14px;
background-color: #eee;
font-family: Consolas, serif;
}
#title-bar span:before {
content: "\25cf";
}
#title-bar span {
font-size: 24px;
}
#close {
color: red;
}
#min {

最低0.47元/天 解锁文章
2180

被折叠的 条评论
为什么被折叠?



