Advertisement
spenat28

Terminal Cursor

Dec 18th, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.45 KB | None | 0 0
  1. <script>
  2.     const input = document.getElementById('input')
  3.     const cursor = document.createElement('span')
  4.     cursor.id = 'cursor'
  5.     input.after(cursor)
  6. </script>
  7. <style>
  8.     @keyframes cursor {
  9.         50% {
  10.             opacity: 0;
  11.         }
  12.     }
  13.     #cursor {
  14.         animation: cursor 1s linear infinite;
  15.         display: block;
  16.         position: absolute;
  17.         padding: 1rem;
  18.         bottom: 0;
  19.         font-size: 2rem;
  20.         pointer-events: none;
  21.     }
  22.     #cursor:after {
  23.         content: '_';
  24.     }
  25. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement