0

我一直在为我正在进行的项目使用 JQuery 终端。我想要的是让终端提示始终位于终端的底部,而不是使用迄今为止的任何输出滚动。这可能吗?

4

1 回答 1

0

你可以使用这个CSS:

    .cmd {
        position: absolute !important;
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto !important;
    }
    .terminal {
        overflow-y: hidden;
    }
    .terminal .terminal-output {
        max-height: calc(100% - 15px);
        overflow-y: auto;
    }

但请注意,当您键入内容时,您不会滚动到底部。如果你只在命令行中输入一行文本,它只会看起来不错,为了让它工作,你需要添加一些 javascript。

我可以尝试创建一个在您键入更多文本行时可以使用的演示。

于 2017-02-02T13:12:37.697 回答