我正在寻找一种方法来在我的html页面中分成两行。第一个是菜单按钮,第二个是显示内容的目标。当你点击菜单上的一个按钮时,它应该在第二个框上显示内容。我该怎么做?HTML中的选项卡
0
A
回答
2
+0
TuteC,感谢您的回复,我做了什么,我在http://jqueryui.com/demos/tabs/复制了源代码,并用我的浏览器打开它没有显示标签..可能是我错过了某些东西来添加我的HTML ..请帮助。 – AlBouazizi 2011-04-11 06:37:30
+0
谢谢你,我尝试了一个简单的(使用Tabs的水平手风琴)我将向前移动复杂的一个..再次感谢你 – AlBouazizi 2011-04-12 08:18:27
0
jQuery的工具选项卡是真的好:
http://flowplayer.org/tools/tabs/index.html
HTML结构的基本例如:
<!-- the tabs -->
<ul class="tabs">
<li><a href="#">Tab 1</a></li>
<li><a href="#">Tab 2</a></li>
<li><a href="#">Tab 3</a></li>
</ul>
<!-- tab "panes" -->
<div class="panes">
<div>pane 1 content</div>
<div>pane 2 content</div>
<div>pane 3 content</div>
</div>
退房上面的链接了解更多详情,演示等
0
这作品非常好。只是删除选项卡之一,它会做你问什么,你可以把任何你喜欢在哪里这里说的标签内容
<div id="selector">
</div>
<div class="tabs">
<!-- Radio button and lable for #tab-content1 -->
<input type="radio" name="tabs" id="tab1" checked >
<label for="tab1">
<i class="fa fa-rocket" aria-hidden="true"></i>
<span>Projects</span>
</label>
<!-- Radio button and lable for #tab-content2 -->
<input type="radio" name="tabs" id="tab2">
<label for="tab2">
<i class="fa fa-users" aria-hidden="true"></i><span>Flash-Mobs</span>
</label>
<!-- Radio button and lable for #tab-content3 -->
<input type="radio" name="tabs" id="tab3">
<label for="tab3">
<i class="fa fa-heartbeat" aria-hidden="true"></i><span>Movement</span>
</label>
<div id="tab-content1" class="tab-content">
<h3>Positive Action Projects</h3>
<p><!-- Tab content here --></p>
</div> <!-- #tab-content1 -->
<div id="tab-content2" class="tab-content">
<h3>Internatonal Positive Action Days</h3>
<p><!-- Tab content here --></p>
</div> <!-- #tab-content2 -->
<div id="tab-content3" class="tab-content">
<h3>Grow the Movement</h3>
<p><!-- Tab content here --></p>
</div> <!-- #tab-content2 -->
</div>
CSS
.tabs {
max-width: 90%;
float: none;
list-style: none;
padding: 0;
margin: 75px auto;
border-bottom: 4px solid #ccc;
}
.tabs:after {
content: '';
display: table;
clear: both;
}
.tabs input[type=radio] {
display:none;
}
.tabs label {
display: block;
float: left;
width: 33.3333%;
color: #ccc;
font-size: 30px;
font-weight: normal;
text-decoration: none;
text-align: center;
line-height: 2;
cursor: pointer;
box-shadow: inset 0 4px #ccc;
border-bottom: 4px solid #ccc;
-webkit-transition: all 0.5s; /* Safari 3.1 to 6.0 */
transition: all 0.5s;
}
.tabs label span {
display: none;
}
.tabs label i {
padding: 5px;
margin-right: 0;
}
.tabs label:hover {
color: #3498db;
box-shadow: inset 0 4px #3498db;
border-bottom: 4px solid #3498db;
}
.tab-content {
display: none;
width: 100%;
float: left;
padding: 15px;
box-sizing: border-box;
background-color:#ffffff;
}
.tab-content * {
-webkit-animation: scale 0.7s ease-in-out;
-moz-animation: scale 0.7s ease-in-out;
animation: scale 0.7s ease-in-out;
}
@keyframes scale {
0% {
transform: scale(0.9);
opacity: 0;
}
50% {
transform: scale(1.01);
opacity: 0.5;
}
100% {
transform: scale(1);
opacity: 1;
}
}
.tabs [id^="tab"]:checked + label {
background: #FFF;
box-shadow: inset 0 4px #3498db;
border-bottom: 4px solid #3498db;
color: #3498db;
}
#tab1:checked ~ #tab-content1,
#tab2:checked ~ #tab-content2,
#tab3:checked ~ #tab-content3 {
display: block;
}
@media (min-width: 768px) {
.tabs i {
padding: 5px;
margin-right: 10px;
}
.tabs label span {
display: inline-block;
}
.tabs {
max-width: 750px;
margin: 50px auto;
}
}
相关问题
- 1. 新选项卡中的HTML
- 2. 数据库中的HTML选项卡
- 3. 选项卡中的嵌套选项卡
- 4. 合并选项卡中的选项卡
- 5. 编辑选项卡HTML/jQuery
- 6. jQuery HTML href选项卡
- 7. HTML CSS选项卡菜单
- 8. flash html text选项卡
- 9. HTML/jQuery选项卡失败
- 10. HTML选项卡支持
- 11. HTML选项卡式控件
- 12. 当我更改HTML中的选项卡时如何刷新iframe的选项卡
- 13. 仅在HTML中创建选项卡
- 14. 在Access 2007中的选项卡外部选项卡上的选项卡
- 15. Android - 导航选项卡 - 刷卡选项卡(固定选项卡)
- 16. 如何在wordpress中将文本选项卡更改为html选项卡
- 17. 在Netbeans中编辑html时将选项卡作为选项卡保留
- 18. WPF - 选项卡控件中的两行选项卡 - 选项卡包装
- 19. Jquery选项卡选中没有选项卡被选中
- 20. Android:选项卡内的选项卡
- 21. jQuery选项卡脚本中的选定选项卡
- 22. 在C#中更改选项卡控件中的选项卡#
- 23. HTML CSS选项卡控件 - 同一页面上的多个选项卡控件
- 24. 隐藏HTML中选定选项卡的底部边框
- 25. 调整选项卡式窗格中的选项卡的大小
- 26. jQuery选项卡 - 获取选定选项卡的选项卡模板
- 27. jQueryUI选项卡:选择选项卡时清除其他选项卡的div
- 28. 选项卡中块
- 29. 当用于选择选项卡的选项卡和箭头时,HTML Select选项无法识别
- 30. html onfocus选项卡和页面加载
一定要接受一个答案如果有解决方案帮助你。 – Dan 2011-05-17 00:28:36