gpt4 book ai didi

html - jQuery Mobile 水平选择 - 最小宽度

转载 作者:行者123 更新时间:2023-11-28 18:36:27 25 4
gpt4 key购买 nike

我想不出 CSS 来给每个选择按钮一个最小或固定宽度。默认情况下,宽度会根据内容进行调整,但我想要最小值。我有几行,我希望它们在选择更改时保持对齐。

对于非 jqm 选择框也有类似的问题,解决方案只是设置 width 属性,但这在这里不起作用。

这是 jsfiddle:

http://jsfiddle.net/btppS/

最佳答案

如果您想更改标签的宽度,您必须在 css 中更改此行:

.ui-btn-text{
width:300px; //example
}

相反,如果您想在单击时更改选择,您可以使用 jquery 尝试此代码:

$(document).ready(function() {
$('#select-choice-month').css('width', '200px');//insert your width this is only for the month
});

关于html - jQuery Mobile 水平选择 - 最小宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12544949/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com