gpt4 book ai didi

jQuery Mobile 按钮大小?

转载 作者:技术小花猫 更新时间:2023-10-29 11:17:45 25 4
gpt4 key购买 nike

我试图让所有这些按钮的大小相同,其中两个更大,因为文字。

这可以使用 CSS 吗?

enter image description here

最佳答案

如果这是一个 jQuery Mobile 问题,那么可以通过更改此类来更改按钮大小:

.ui-btn {
width: 200px !important;
}

!important 对于 jQuery Mobile 是必需的,因为我们需要覆盖默认值。

工作示例:http://jsfiddle.net/Gajotres/NJ8q4/

现在,因为您正在使用标签按钮(我从您之前的问题中了解到),您需要为其提供自定义 ID 或类。如果您只更改 .ui-btn,您将更改应用程序中的每个按钮。所以最终这个 CSS 将与这个 HTML 一起工作:

HTML :

<a data-role="button" class="custom-btn">Level 5</a>
<a data-role="button" class="custom-btn">Level 4</a>
<a data-role="button" class="custom-btn">Level 3</a>
<a data-role="button" class="custom-btn">Level 2</a>
<a data-role="button" class="custom-btn">Level 1</a>
<a data-role="button" class="custom-btn">Stretch</a>
<a data-role="button" class="custom-btn">Warm up</a>

CSS:

.custom-btn {
width: 200px !important;
}

第二个工作示例:http://jsfiddle.net/Gajotres/NJ8q4/1/

关于jQuery Mobile 按钮大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17686867/

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