1
我已经使用jQuery的虚拟键盘,我想显示在文本字段顶部的键盘。我试图通过立场。如何在输入栏顶部移动虚拟键盘?
JQuery的
$('#test').keyboard({ layout: 'qwerty', usePreview: false,position: {
// null = attach to input/textarea;
// use $(sel) to attach elsewhere
of: null,
my: 'left top',
at: 'left top',
// used when "usePreview" is false
at2: 'left top'
} });
HTML
<p style="height:200px" >
content
</p>
<input type="text" class="form-control" id="test" placeholder="test" autocomplete="off">
这里是演示网址http://jsfiddle.net/bhumi/rzrjw15h/1/。
我也试图设置位置一样
position : {
of : '#searchterms', // when null, element will default to kb.$keyboard
my : 'top', // 'center top', (position under keyboard)
at : 'top-200', // 'center bottom',
}
位置从顶部是动态的,这个改变时不工作 –