Replace typewriter cursor with CSS blink animation for poet field

This commit is contained in:
2026-05-14 02:11:50 +08:00
parent 680f10b66a
commit e965204401
3 changed files with 43 additions and 29 deletions
+15 -2
View File
@@ -78,8 +78,18 @@ html.dark .theme-toggle-light {
display: none;
}
/* Typewriter cursor blink */
@keyframes tk-blink {
/* Vim-style block cursor via ::after */
#typewriter-text::after {
content: "";
display: inline-block;
width: 0.6em;
height: 1.1em;
background: #999;
vertical-align: text-bottom; transform: translateY(-2px);
margin-left: 1px;
animation: vim-blink 0.8s step-end infinite;
}
@keyframes vim-blink {
0%,
100% {
opacity: 1;
@@ -88,3 +98,6 @@ html.dark .theme-toggle-light {
opacity: 0;
}
}
.dark #typewriter-text::after {
background: #ccc;
}