Skip to content

Commit 7c1947a

Browse files
committed
[MODIFY] style.css, main.js
changed cursor type, added small animation to cursor
1 parent 158aa35 commit 7c1947a

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

assets/css/style.css

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,19 @@ h2 {
178178
color: #ccc;
179179
}
180180

181+
.txt-type {
182+
color: rgba(255, 255, 0, 0.8);
183+
}
184+
181185
/* Cursor */
182-
.txt-type > .txt {
183-
border-right: 0.1rem solid #ccc;
186+
.txt-type::after {
187+
color: #fff;
188+
content: "_";
189+
animation: animate-cursor 1s infinite;
190+
}
191+
192+
@keyframes animate-cursor {
193+
75% {
194+
content: "";
195+
}
184196
}

assets/js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class TypeWriter {
215215
}
216216

217217
// Insert text into element
218-
this.textElement.innerHTML = `<span class="txt">${this.text}</span`;
218+
this.textElement.innerHTML = this.text;
219219

220220
// Initial type Speed
221221
let typeSpeed = 250;

0 commit comments

Comments
 (0)