2017-05-29 6 views
0

WordPressでカスタムポストタイプを使用するBootstrap 4の推薦スライダーを作成しようとしていますが、私はスライダーを動作させるのに苦労しています。Bootstrap 4スライダーテキストのみの覚え書き

あなたに私の質問があります。どのようにテキストをカルーセルに入れるだけですか?私が画像をコメントアウトすると、それはうまくいかず、これを行う方法についてウェブを検索しましたが、BS4のために多くの賛成がありませんでした。

<div class="testimonial-Slider"> 
    <div class="container"> 
     <div class="row"> 

<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel"> 
    <ol class="carousel-indicators"> 
    <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li> 
    <li data-target="#carouselExampleIndicators" data-slide-to="1"></li> 
    <li data-target="#carouselExampleIndicators" data-slide-to="2"></li> 
    </ol> 
    <div class="carousel-inner" role="listbox"> 
    <div class="carousel-item active"> 
     <img class="d-block img-fluid" src="http://lorempixel.com/960/300/" alt="First slide"> 

    <div class="carousel-caption"> 
     <h3>Test Headings</h3> 
     <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the indu</p> 
    </div> 
    </div> 

    <div class="carousel-item"> 
     <img class="d-block img-fluid" src="http://lorempixel.com/960/300/" alt="Second slide"> 
     <div class="carousel-caption"> 
     <h3>Test Headings</h3> 
     <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the indu</p> 
     </div> 
    </div> 
    <div class="carousel-item"> 
     <img class="d-block img-fluid" src="http://lorempixel.com/960/300/" alt="Third slide"> 
     <div class="carousel-caption"> 
     <h3>Test Headings</h3> 
     <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the indu</p> 
     </div> 
    </div> 
    </div> 
    <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev"> 
    <span class="carousel-control-prev-icon" aria-hidden="true"></span> 
    <span class="sr-only">Previous</span> 
    </a> 
    <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next"> 
    <span class="carousel-control-next-icon" aria-hidden="true"></span> 
    <span class="sr-only">Next</span> 
    </a> 
</div> 
</div> 
</div> 
</div> 

カスタムポストタイプとWPクエリを正常に動作させることはできますが、これは私が問題を抱えていることです。

乾杯の人々:)

答えて

1

.carousel-captionは、それは親の内部のように、それはスペースを占有しませんposition:absoluteを使用しています。スペースを埋めるイメージで、高さを与えます。

position: relativeを使用してください。 .carousel-captionに適用されているすべてのプロパティを確認すると、おそらく他の問題が発生する可能性があります。

または、.carousel-caption-customのような.carousel-itemのような新しいクラスを作成し、必要なCSSだけを使用してください。

+0

これはありがとう、それは私を助けて、今それは解決され、もう一度歓声! – user3502952

関連する問題