如何使 jQuery UI 选项卡出现在页面底部
有没有办法让 jQuery UI 选项卡小部件选项卡出现在页面底部? 使用 jQuery 站点中的示例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Tabs - Default functionality</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#tabs").tabs();
});
</script>
</head>
<body>
<div class="demo">
<div id="tabs">
<ul>
<li><a href="#tabs-1">Nunc tincidunt</a></li>
<li><a href="#tabs-2">Proin dolor</a></li>
<li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
<div id="tabs-1">
<p>Blah</p>
</div>
<div id="tabs-2">
<p>More blah</p>
</div>
<div id="tabs-3">
<p>The return of blah</p>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Click tabs to swap between content that is broken into logical sections.</p>
</div><!-- End demo-description -->
</body>
</html>
选项卡显示在顶部,这是正常的,但我想做一个电子表格应用程序,因此选项卡应显示在底部。先感谢您。
Is there some way to make the jQuery UI tab widget tabs appear at the bottom of a page?
Using the example from the jQuery site:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Tabs - Default functionality</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#tabs").tabs();
});
</script>
</head>
<body>
<div class="demo">
<div id="tabs">
<ul>
<li><a href="#tabs-1">Nunc tincidunt</a></li>
<li><a href="#tabs-2">Proin dolor</a></li>
<li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
<div id="tabs-1">
<p>Blah</p>
</div>
<div id="tabs-2">
<p>More blah</p>
</div>
<div id="tabs-3">
<p>The return of blah</p>
</div>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Click tabs to swap between content that is broken into logical sections.</p>
</div><!-- End demo-description -->
</body>
</html>
The tabs appear at the top, which is normal, but I'd like to do a spreadsheet application, so the tabs should appear at the bottom. Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不幸的是,“内容下方的选项卡”示例不再出现在 jQuery 文档中,因此您可以使用以下 CSS 重新定位 jQuery UI 选项卡控件:
这会将选项卡放置在
#tabs
容器。如果您想保持静态高度,您可以为您的#tabs
容器指定一个高度值。注意:上面的 CSS 改编自 Keith Wood 的示例。
Unfortunately the 'tabs below content' example is no longer present in the jQuery documentation, so you can use the following CSS to reposition your jQuery UI tab controls:
This will position the tabs on the bottom on your
#tabs
container. If you want to keep a static height you can give your#tabs
container a height value.Note: the above CSS was adapted from Keith Wood's example.
在 jquery UI 1.10.0 中,更改列表顺序后 - 它应该位于选项卡大纲 div 的底部,一切都很完美:
In jquery UI 1.10.0 after changing order of list - it should be at the bottom of tab outline div, everything works perfect:
您是否尝试过使用 CSS 将选项卡移动到内容区域下?我想这就是你想要的。
Have you tried using CSS to move the tabs under the content area? I think thats what you are going for.