2017-07-31 73 views
0

我使用materializecss。我有兩個問題。
第一:如何用「活動」類標記標籤(就像點擊了一樣)?如果我打開標籤頁(下一個「活動」標籤頁後面),我沒有看到該標籤頁(包裹在其中)在這一刻打開。 (我使用兩行製表符) 第二:如何標記製表符的文本(好像是徘徊在兩行中) 非常感謝您的幫助。Materialisecss選項卡

回答

0

請有文檔一看: http://materializecss.com/tabs.html

可以使用回調函數昂秀 因此,當一個選項卡顯示你可以做任何你想要的^^

您的製表觸發(也許您的一個標籤)自動獲得的「活動」類,激活

0

時生成使用兌現CSS,你可以這樣做&窩旅遊標籤:

<ul id="tabs-swipe-demo" class="tabs"> 
    <li class="tab col s3"><a href="#test-swipe-1">Test 1</a></li> 
    <li class="tab col s3"><a class="active" href="#test-swipe-2">Test 2</a></li> 
    <li class="tab col s3"><a href="#test-swipe-3">Test 3</a></li> 
</ul> 
<div id="test-swipe-1" class="col s12 blue"> 
Test 1 <!-- whatever inside first tab --> 
<!-- you can nest another set of tab inside like so : --> 
    <ul id="tabs-swipe-demo" class="tabs"> 
     <li class="tab col s3"><a href="#test-swipe-4">Test 4</a></li> 
     <li class="tab col s3"><a class="active" href="#test-swipe-5">Test 5</a></li> 
     <li class="tab col s3"><a href="#test-swipe-6">Test 6</a></li> 
    </ul> 
    <div id="test-swipe-4" class="col s12 blue"> 
     Test 4 <!-- whatever inside first tab -->   
    </div> 
    <div id="test-swipe-5" class="col s12 red"> 
     Test 5 <!-- whatever inside secont tab --> 
    </div> 
    <div id="test-swipe-6" class="col s12 green"> 
     Test 6 <!-- whatever inside third tab --> 
    </div> 
</div> 

<div id="test-swipe-2" class="col s12 red"> 
    Test 2 <!-- whatever inside secont tab --> 
</div> 

<div id="test-swipe-3" class="col s12 green"> 
    Test 3 <!-- whatever inside third tab --> 
</div> 

改變標籤的字體顏色和背景顏色上懸停或活動狀態,你可以把你的CSS:

<style> 
/*when hover*/ 
.tabs .tab a:hover{ 
    background-color:/* put some background color*/; 
    color:/* put some font color*/; 
} 
/*when active*/ 
.tabs .tab a.active{ 
    background-color:/* put some background color*/; 
    color:/* put some font color*/; 
} 
</style> 
相關問題