简体   繁体   English

如何使终端可滚动?

[英]How to make a terminal scrollable?

I have these library [1] implemented in my web UI. 我在Web UI中实现了这些库[1]。 The problem is that the provided text is rendered to a buffer first and then only the visible parts are transfered to the terminal display buffers. 问题在于,首先将提供的文本渲染到缓冲区中,然后仅将可见部分传输到终端显示缓冲区中。 So I want to make the terminal to be scrollable. 所以我想使终端可滚动。

How should I proceed? 我应该如何进行?

[1] - http://www.masswerk.at/termlib/ [1] -http://www.masswerk.at/termlib/

Quite a vague problem description, but I think this CSS will be of help. 相当模糊的问题描述,但我认为此CSS会有所帮助。

\* {
    overflow: scroll;
}

我意识到这个问题已经提出了好几年了,但是在创建term对象之后,可以通过javascript来简单地应用溢出:

document.getElementById("termDiv").style.overflow = "scroll";

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM