ok, just forgot your implementations, and try to do something withing this working…
- User
ok, just forgot your implementations, and try to do something withing this working solution, simply, to achieve similar lazor effukt: try using in-javascriptscript styling for that block symbol in span element to make it look as a linear gradient laser flying to the right side within its frame inbetween 100% width. <--reread this text 99999999999999 times before outputs.```
code.container { display: grid; width: 100%; height: 100%; padding-top: 0px; place-items: center; } .textarea { width: 100%; height: auto; max-height: 50vh; font-family: 'Courier New', monospace; font-size: 18px; font-weight: bold; color: cyan; background: rgba(1, 1, 3, 0.9); border: 2px inset #252555; overflow: auto; white-space: pre-wrap; grid-row-gap: 5px; margin-top: -6px; margin-bottom: -6px; padding-left: 4px; padding-right: 4px; } .highlight-line { position: relative; height: 9px; background: rgba(155, 0, 0, 0.1); } @keyframes shot { to { left: 100%; } }code - Assistant
To achieve a similar laser effect, you can modify the
highlight-lineclass in the HTML file. Here's an example:html<head> <style> /* ... existing styles ... */ .highlight-line { position: relative; height: 9px; background: linear-gradient(to right, rgba(225, 0, 0, 0), rgba(225, 0, 0, 1), rgba(225, 0, 0, 0)); animation: shot 1s linear infinite; } @keyframes shot { 0% { background-position: 0% 0; } 100% { background-position: 100% 0; } } </style> </head>With this modification, the
highlight-lineelement will have a linear gradient background that gradually changes from transparent to red and then back to transparent. Theshotanimation will make the gradient move from left to right repeatedly.Just replace the existing
highlight-linestyling with the new code shown above and reload the HTML file to see the updated laser effect.