问题描述
如果我像下面那样更改微调框宽度,仅更改了向上/向下箭头位置-文本区域保留为默认值,那么如何更改微调框的大小-包括文本区域.
If i change the Spinner width like below only the up/down arrow place is changed-the text area remains as default, how do i change the size of the spinner -including the text area.
<p:spinner id="spinnerBasic" style="width:50px;"/>
推荐答案
Primefaces微调器是一个复合组件,由文本字段和控制元素组成.所有这些都将在<span>
内部呈现.
The Primefaces spinner is a compound component consisting of a text field and the control elements. All this will be rendered inside a <span>
.
如果只想更改文本输入的大小,则p:spinner
具有size属性:
If you only want to change the size of the text input, the p:spinner
has a size attribute:
<p:spinner id="spinnerBasic" size="20"..../>
从 primefaces文档:
对应的css类是ui-spinner-input
.更改此类的width
属性以获取所需的更改.
The corresponding css class is ui-spinner-input
. Changing the width
attribute of this class to get the desired changes.
这篇关于Primefaces微调器-如何更改宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!