[英]How do you make it so someone can 'type' on your website without input text box?
因此,我目前正在開發類似網站的終端,您在其中輸入命令並發生了某些情況。 這就是我的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>
使用帶有文本區域的表單,並使邊框和背景透明。 不要添加提交按鈕。 按下Enter提交(使用JavaScript后備)。 那對你有用嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.