如何强制jquery终端保持相同的大小? [英] How do I force jquery terminal to remain the same size?

查看:136
本文介绍了如何强制jquery终端保持相同的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Jquery终端,看起来很酷。我一直在寻找几个小时,当输入文字时,我找不到让控制台保持静止的方法。

I am using Jquery terminal and it seems pretty cool. I've been looking around for several hours now, and I can't find a way to get the console to remain stationary when text is inputted.

相反,控制台我输入的每一行输入的大小都会增加。有没有人知道如何为终端保持恒定的大小,这是我错过的设置还是什么?我想要这个

Instead, the console increases in size for every line of input that I enter. Does anyone know how to keep a constant size for the terminal, is it a setting I missed or something? I want something like this.

推荐答案

添加高度选项:

JS

$('#terminal').terminal(function (command, term) {
    if (command == 'test') {
        term.echo("you just typed 'test'");
    } else {
        term.echo('unknown command');
    }
}, {
    prompt: '>',
    name: 'test',
    height: 200
});

演示: http://jsfiddle.net/11o3spLd/

这篇关于如何强制jquery终端保持相同的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆