2013-05-21 197 views
-2

我有三個按鈕和三個面板。我點擊按鈕面板1只在當時加載,面板2和3不可見。如果我點擊按鈕2面板2加載,面板1和3不可見。我想改變我的按鈕樣式像tabcontainer tabs.these三個按鈕喜歡顯示tabs.is它有可能在CSS與asp.net?更改按鈕樣式

+1

爲了讓任何人來幫助你,你需要發佈相關的HTML/CSS/js –

+0

當然是有可能的。 –

+0

它可能與jquery或javascript – pankaj

回答

1

你可以使用的Togglable tabs

<link href="assets/css/bootstrap.css" rel="stylesheet"> 
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> 
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> 
<script src="assets/js/bootstrap-transition.js"></script> 
<script src="assets/js/bootstrap-tab.js"></script> 
<script> 
$('#panel a').click(function(e) { 
    e.preventDefault(); 
    $(this).tab('show'); 
}) 

// first active 
$('#panel a:first').tab('show'); 
</script> 

<div class="tabbable"> 
<ul id="panel" class="nav nav-tabs"> 
    <li><a href="#button1" data-toggle="tab">Button 1</a></li> 
    <li><a href="#button2" data-toggle="tab">Button 2</a></li> 
    <li><a href="#button3" data-toggle="tab">Button 3</a></li> 
</ul> 
<div class="tab-content"> 
    <div class="tab-pane fade in active" id="button1"> 
    You have click button 1 and show a panel 1 </div> 
    <div class="tab-pane fade in " id="button2">You have click button 2 and show a panel 2</div> 
    <div class="tab-pane fade in " id="button3">You have click button 3 and show a panel 3 </div> 
</div> 

這一個概念的演示:jsfiddle