我正在尋找一種方法來在我的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