gpt4 book ai didi

javascript - 如何让 jquery 移动控制组宽度 100%?

转载 作者:数据小太阳 更新时间:2023-10-29 04:31:21 26 4
gpt4 key购买 nike

我正在使用 jquery mobile 做一个演示...我想让 localnav 的宽度为 100%...但我不知道该怎么做...代码在这里...

<ul data-role="controlgroup" data-type="horizontal" class="localnav">
<li><a href="#" data-role="button" data-transition="fade" class="ui-btn-active">111</a></li>
<li><a href="#" data-role="button" data-transition="fade">222</a></li>
<li><a href="#" data-role="button" data-transition="fade">333</a></li>
</ul>

请帮帮我...谢谢...

最佳答案

这就是我所做的。效果很好。

CSS:

<style>
.ui-grid-a, .ui-grid-a .ui-controlgroup-controls {width: 100%}
#homePageButton {width:49%;float:left;margin-left:1%}
#logOutButton {width:49%}
#footer {height:45px}
</style>

HTML:

<div data-role="footer" data-position="fixed" id="footer">
<div data-role="controlgroup" data-type="horizontal" class="ui-grid-a">
<a href="#" data-role="button" data-icon="home" id="homePageButton">Home Page</a>
<a href="#" data-role="button" data-icon="forward" data-iconpos="right" id="logOutButton">Log Out</a>
</div>
</div>

结果: enter image description here

关于javascript - 如何让 jquery 移动控制组宽度 100%?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10929226/

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