因此,我正在开发一个类似于网站的终端,您可以在其中输入命令。这就是我的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>
答案 0 :(得分:0)
使用带有textarea的表单,并使边框和背景透明。不要添加提交按钮。按Enter键提交(使用javascript后备)。这对你有用吗?