css实现控制台命令行输入打字效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现控制台命令行输入打字效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> html { background: #222; font-family: helvetica; display: flex; align-items: center; justify-content: center; height: 100vh; } html .blue { color: #53d9d1; } html .pink { color: #f27b9b; } html .orange { color: #eb7132; } html .console { border: 1px solid #444; border-radius: 3px; margin: 2rem; box-shadow: 0 0 15px 0px rgba(0, 0, 0, 0.75); } html .console .top { background: #333; color: #666; text-align: center; font-size: 12px; padding: 5px; } html .console .top .options { font-size: 16px; float: left; } html .console .text { font-family: courier; color: #fff; font-size: 14px; padding: 0.25rem; } .typewriter { overflow: hidden; width: fit-content; white-space: nowrap; border-right: 0.15em solid #eb7132; animation: typing 3s steps(15, end), blink-caret 0.75s step-end infinite; } /* The typing effect */ @keyframes typing { from { width: 0; } to { width: 60%; } } /* The typewriter cursor effect */ @keyframes blink-caret { from, to { border-color: transparent; } 50% { border-color: orange; } } </style> </head> <body> <div class="console"> <div class="top"> <span class="options">⦿ ○ ○</span> <span class="title">PSY - GANGNAM STYLE </span></div> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0