如何在查询移动设备中调整文本区域的大小? [英] How to resize the text area in query mobile?
问题描述
能否请您告诉我如何调整文本区域的大小?实际上问题是我在单击按钮时打开了弹出屏幕.在我的弹出屏幕中,我只有一个文本区域(具有较小的区域).
Can you please tell me how to resize the text area? Actually the problem is that I open the pop up screen on button click. In my pop up screen I have one text area (having small area).
<textarea cols="40" rows="8" name="textarea-12" id="text-12" class="caseTextArea_h" autocorrect="off"></textarea>
我在该文本区域上写了很多字符,然后将其关闭.我再次打开它,它具有与关闭前相同的面积(大面积)?如何调整该文本区域的大小,使其以相同的起始大小开始.
I write many characters on that text area and than close it. Again I open this and it has the same area that was before closing(large area)? How to resize that text area so that it starts with same starting size.
我的代码:
<div data-role="popup" id="CaseInformationScreen" data-close-btn="none" data-overlay-theme="a" data-dismissible="false">
<div data-role="header" data-theme="b"> <a href="#" data-role="button" data-corners="false" id="Cancel">Cancel</a>
<h1>Case Information</h1>
<a href="#" data-role="button" data-corners="false" id="AddButton">Add</a>
</div>
<div data-role="content">
<div>
<img src="img/Documents.png" />
</div>
<div data-role="fieldcontain">
<label for="text-12" style="text-align:top;margin-left: 0px;">Case Name:</label>
<input name="text-12" id="text-12" value="" type="text" class="caseName_h" autocorrect="off">
</div>
<div data-role="fieldcontain">
<label for="caseDate" style="text-align:left;margin-left: 0px;">Case Date:</label>
<input name="caseDate" id="caseDate" value="" type="date" class="caseDate_h">
<!--input name="mydate2" id="mydate2" type="date" data-role="datebox" class="caseDate_h" data-options='{"mode": "calbox","useNewStyle":true,"zindex":1200}'/-->
</div>
<div data-role="fieldcontain">
<label for="textarea-12">Case Notes :</label>
<textarea cols="40" rows="8" name="textarea-12" id="text-12" class="caseTextArea_h" autocorrect="off"></textarea>
</div>
</div>
</div>
推荐答案
工作示例: http://jsfiddle.net/Gajotres/7JqRG/3/
只需使用此CSS:
#text-12 {
width: 100% !important;
height: 50px !important;
max-height: 50px !important;
}
它将锁定文本区域的高度. !important必须用于覆盖默认值.
It will lock textarea height. !important must be used to override default values.
这篇关于如何在查询移动设备中调整文本区域的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!