2016-10-05 188 views
0

CODE引導 - 分頁模式中不工作

<!-- Modal --> 
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> 
    <div class="modal-dialog" role="document"> 
    <div class="modal-content"> 
     <div class="modal-body"> 
      <div class="row"> 
       <div class="col-md-8 m"><img src="http://www.goldmedalmind.net/wp-content/uploads/2014/04/anns-face-round.png"></div> 
       <div class="col-md-8 purplebg m"> 

        <div> 

         <!-- Nav tabs --> 
         <ul class="nav nav-tabs" role="tablist"> 
         <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a></li> 
         <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li> 
         <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li> 
         <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li> 
         </ul> 

         <!-- Tab panes --> 
         <div class="tab-content"> 
         <div role="tabpanel" class="tab-pane active" id="home">...</div> 
         <div role="tabpanel" class="tab-pane" id="profile">...</div> 
         <div role="tabpanel" class="tab-pane" id="messages">...</div> 
         <div role="tabpanel" class="tab-pane" id="settings">...</div> 
         </div> 

        </div> 

       </div> 
      </div> 

     </div> 
    </div> 
    </div> 
</div> 

結果

enter image description here

的JS文件是:

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 
    <!-- Include all compiled plugins (below), or include individual files as needed --> 
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script> 

****更新****

它適用於當我使用https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css而不是我通過http://getbootstrap.com/customize得到的,但我所做的只是更改列數和填充。

+0

你有什麼確切的標籤意味着不工作?我複製粘貼你的代碼模型是工作選項卡有什麼你想要的? –

+0

工作正常。 ..我認爲你的src有問題:https://jsfiddle.net/DTcHh/25891/ – DTH

+0

你是否包含Bootstrap CSS文件?看來,如果包含css,那麼你在問題中包含的結果是不合適的。 – Shashank

回答

1

我的猜測是你缺少引導CSS。 或者你是否錯過了這裏的任何細節?

這裏的包括CSS後工作正常片段:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> 
 

 
<!-- Modal --> 
 
<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="display: block;"> 
 
    <div class="modal-dialog" role="document"> 
 
    <div class="modal-content"> 
 
     <div class="modal-body"> 
 
     <div class="row"> 
 
      <div class="col-md-8 m"> 
 
      <img src="http://www.goldmedalmind.net/wp-content/uploads/2014/04/anns-face-round.png"> 
 
      </div> 
 
      <div class="col-md-8 purplebg m"> 
 

 
      <div> 
 

 
       <!-- Nav tabs --> 
 
       <ul class="nav nav-tabs" role="tablist"> 
 
       <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a> 
 
       </li> 
 
       <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a> 
 
       </li> 
 
       <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a> 
 
       </li> 
 
       <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a> 
 
       </li> 
 
       </ul> 
 

 
       <!-- Tab panes --> 
 
       <div class="tab-content"> 
 
       <div role="tabpanel" class="tab-pane active" id="home">Home</div> 
 
       <div role="tabpanel" class="tab-pane" id="profile">Profile</div> 
 
       <div role="tabpanel" class="tab-pane" id="messages">Message</div> 
 
       <div role="tabpanel" class="tab-pane" id="settings">Settings</div> 
 
       </div> 
 

 
      </div> 
 

 
      </div> 
 
     </div> 
 

 
     </div> 
 
    </div> 
 
    </div> 
 
</div>

+0

我使用Bootstrap定製器來創建CSS,我所做的只是更改列的數量。這可能是原因 - 如果是這樣,爲什麼定製商擰它? – pee2pee

+0

現在工作 - 我只是redownloaded另一個自定義CSS並上傳它,它的工作。 – pee2pee