我正在使用jQuery UI Button控件,但似乎无法调整大小(宽度和高度).这是API文档.我尝试在其上设置STYLE属性,但是LABEL没有正确居中.谢谢.
Jak*_*use 30
在style属性中尝试这个:
width: 300px;
padding-top: 10px;
padding-bottom: 10px;
Run Code Online (Sandbox Code Playgroud)
要么
$(element).css({ width: '300px', 'padding-top': '10px', 'padding-bottom': '10px' });
Run Code Online (Sandbox Code Playgroud)
一般:
$(theElement).css('height','...px').css('width','...px');
Run Code Online (Sandbox Code Playgroud)
小智 5
您可以设置样式.ui-button.ui-widget(没有空格,必须有两个类)。(确保您的样式表出现在 jquery ui 下方)。你也可以风格
.ui-button.ui-widget{
height, width
}
.ui-button.ui-widget .ui-button-text{
line-height, font-size
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
62265 次 |
| 最近记录: |