jQuery Mobile和textarea行 [英] jQuery Mobile and textarea rows

查看:134
本文介绍了jQuery Mobile和textarea行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我想在只有一行显示 textarea

So, I'ld like to display a textarea on just 1 row.

但是jQuery Mobile doesn 't think so ...无论我在属性中设置的值是什么,它总是2行高...

But jQuery Mobile doesn't think so... Whatever value I set in the rows attribute, it always is 2 rows height...

有任何解决方案吗?

推荐答案

jQuery Mobile CSS为 textarea 元素:

The jQuery Mobile CSS sets a specific height for textarea elements:

textarea.ui-input-text {
    height : 50px;

    -webkit-transition : height 200ms linear;
       -moz-transition : height 200ms linear;
         -o-transition : height 200ms linear;
            transition : height 200ms linear;
}

您可以创建自己的规则, :

You can create your own rule to override this height to something more single-line:

.ui-page .ui-content .ui-input-text {
    height : 25px;
}​

演示: http://jsfiddle.net/mEs8U/

这篇关于jQuery Mobile和textarea行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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