2016-08-12 11 views
0

bootstrapmodalに問題があります。d3.jsドーナツチャートを入れましたが、このように間違って表示されます。 enter image description hereブートストラップモーダルでd3.jsが正しく表示されない

数字はテキストと重複しますが、modalなしでは完全に機能します。

<div class="portfolio-modal modal" id="portfolioModal6" tabindex="-1" role="dialog" aria-hidden="true"> 
     <div class="modal-content"> 
      ... 
      <div class="container"> 
       ... 
       <div class="row"> 
        ... 
        <div class="col-md-6"> 
         <div id="pieChart"></div> 
        </div>     
       </div> 
      </div> 
     </div> 
    </div> 

答えて

0

多分あなたはモーダル幅の問題に直面しています。

Bootstrap 3.1.1には、モーダルlgおよびモーダルsmクラスが追加されました。 @mediaクエリを使用してモーダルサイズを制御します。これはモーダルサイズをよりグローバルに制御する方法です。あなた

<!-- Large modal --> 
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg">Large modal</button> 

<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"> 
    <div class="modal-dialog modal-lg"> 
    <div class="modal-content"> 
     ... 
    </div> 
    </div> 
</div> 

<!-- Small modal --> 
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Small modal</button> 

<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria- labelledby="mySmallModalLabel" aria-hidden="true"> 
    <div class="modal-dialog modal-sm"> 
    <div class="modal-content"> 
     ... 
    </div> 
    </div> 
</div> 

ため

@media (min-width: 992px) 
.modal-lg 
{ 
    width: 900px; 
    height: 900px; /* control height here if its needed */ 
} 

1つのサンプル私は、それは後に、私の質問の一部を解決するためだ

+0

)=あなたはJSFIDDLEファイルを提供することができれば、私たちの仕事を楽になり、これは私の友人に役立ちます願っています私は少し修正する、それは完璧に、ありがとう。 –

関連する問題