Created
February 25, 2019 19:36
-
-
Save domeniko-gentner/530fb61adf1e5bbc6cf1c99404edb344 to your computer and use it in GitHub Desktop.
Console Input in HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#game-input-span { | |
position: absolute; | |
display: block; | |
font-family: 'Ubuntu Mono', monospace; | |
font-size: 18px; | |
color: #2ECC40; | |
} | |
#game-input { | |
background-color: black; | |
color: #2ECC40; | |
border: 1px solid #2ECC40; | |
font-family: 'Ubuntu Mono', monospace; | |
font-size: 18px; | |
border-top: none; | |
border-bottom-left-radius: 5px; | |
border-bottom-right-radius: 5px; | |
vertical-align: top; | |
padding-left: 110px; | |
} | |
<div class="inner-grid-item-2"> | |
<span id="game-input-span">user@box:~ $</span> | |
<input type="text" id="game-input" onsubmit="return false;" onkeyup="if (event.key=='Enter'){new Shell().runOS(this.value);}"> | |
</div> | |
Fiddle: https://jsfiddle.net/v95rdm3z/1/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment