[英]How do you make it so someone can 'type' on your website without input text box?
So I am currently developing a terminal like website where you put in a command and something happens. 因此,我目前正在开发类似网站的终端,您在其中输入命令并发生了某些情况。 This is what my CSS and HTML files looks like... 这就是我的CSS和HTML文件的样子...
p { color: white; font-family: fixedsys, LucidaTerminal, monospace } .blink_text { -webkit-animation-name: blinker; -webkit-animation-duration: 1s; -webkit-animation-timing-function: linear; -webkit-animation-iteration-count: infinite; -moz-animation-name: blinker; -moz-animation-duration: 1s; -moz-animation-timing-function: linear; -moz-animation-iteration-count: infinite; animation-name: blinker; animation-duration: 1s; animation-timing-function: linear; animation-iteration-count: infinite; color: white; } @-moz-keyframes blinker { 0% { opacity: 1.0; } 50% { opacity: 0.0; } 100% { opacity: 1.0; } } @-webkit-keyframes blinker { 0% { opacity: 1.0; } 50% { opacity: 0.0; } 100% { opacity: 1.0; } } @keyframes blinker { 0% { opacity: 1.0; } 50% { opacity: 0.0; } 100% { opacity: 1.0; } }
<!DOCTYPE html> <head> <link rel="stylesheet" type="text/css" href="interface.css"> </head> <body style="background-color:black;"> <p style="display:inline">~/Link/Hydrogen/Helium/Lithium></p> <span class="blink_text">_</span> </body>
Use a form with a textarea and make the borders and the background transparant. 使用带有文本区域的表单,并使边框和背景透明。 Do not add a submit button. 不要添加提交按钮。 Submit (with javascript fallback) on pressing enter. 按下Enter提交(使用JavaScript后备)。 Does that work for you? 那对你有用吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.