Primefaces微调器-如何更改宽度 [英] Primefaces spinner - How to change width

查看:118
本文介绍了Primefaces微调器-如何更改宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我像下面那样更改微调框宽度,仅更改了向上/向下箭头位置-文本区域保留为默认值,那么如何更改微调框的大小-包括文本区域.

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文档:

size:用于确定宽度的字符数 输入元素.

size: Number of characters used to determine the width of the input element.

对应的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微调器-如何更改宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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