我在我的应用程序中使用jQuery Mobile1.4.2。文本区域滚动条有一个问题,即滚动条是可见的。如何启用滚动条视图。我需要与滚动条类似的文本区域,如下面的链接。
我的代码如下,
HTML:
<div data-role="page" id="privacy_details">
<div data-theme="a" data-role="header">
<h3>
Privacy Policy
</h3>
</div>
<div data-role="content">
<div data-role="fieldcontain">
<textarea class="txtarea" style="resize: none;">
data
data
data
data
data
data
data
data
data
data
data
data
data
data
</textarea>
<a href="#" data-rel="back" data-role="button" data-theme="c" target="_blank">OK</a>
</div>
</div>
</div>CSS:
.txtarea { height:300px; max-height: 300px; }我的屏幕截图如下

发布于 2014-06-12 08:57:57
为textarea设置一个固定的textarea,然后添加data-autogrow="false"以防止其自动增长.
发布于 2014-06-12 07:27:22
嘿,你的内联风格会被覆盖。您需要将类或id添加到文本区域,并在css文件中对其进行样式设置。
.txtarea {
max-height:100px !important;
height:100px !important;
overflow:scroll !important;
}并且您需要添加overflow:scroll !important属性
https://stackoverflow.com/questions/24178358
复制相似问题