2016-11-13 39 views
2

イーベイのリスティングの説明を編集するスクリプトが許可されていない場所。 eBayの説明はeBayテンプレートに埋め込まれています。どのようにブートストラップグリッドの問題を解決するには?

私の#portfolioがmobileに正しく表示されないことが判明しました。

desktopでは、col-lg-3と同じように機能します。モバイルiveでは、2 x 2グリッドが必要なので、col-xs-6を使用しました。 問題は、最後の列が別の行にドラッグされることです。 上記のモバイル画像を参照して、問題を表示してください。

誰かが最後の列が新しい行に吸い込まれるのを止める新しいCSSトリックを教えてもらえますか?

<div id="portfolio" class="container-fluid text-center "> 
    <h2><font color="#ce2065">the shills black mask</font><br><font size="1">&nbsp;</font></h2> 
    <div class="row"> 
     <div class="col-sm-3 col-xs-6"> <img src="http://justbeauty-uk.s3.amazonaws.com/shillspoint1.jpg" class="img-responsive img-thumbnail img-circle margin" alt="Image" style="text-align: center; width: 60%;"> 
      <p style="text-align: center;"><span style="line-height: 1.8;">The latest trend in skincare.&nbsp;</span>Proven results with the word’s best selling black mask - loved by beauty bloggers, as seen on YouTube</p> 
     </div> 
     <div class="col-sm-3 col-xs-6"> <img src="http://justbeauty-uk.s3.amazonaws.com/shillspoint2.jpg" class="img-responsive img-thumbnail img-circle margin" alt="Image" style="text-align: center; width: 60%;"> 
      <p><span style="line-height: 1.8;">Activated charcoal quickly and effectively pulls blackheads from the root and aids skin regeneration. Promotes healthy skin too!</span></p> 
     </div> 
     <div class="col-sm-3 col-xs-6"> <img src="http://justbeauty-uk.s3.amazonaws.com/shillspoint3.jpg" class="img-responsive img-thumbnail img-circle margin" style="text-align: center; width: 60%;"> 
      <p><span style="line-height: 1.8;">Brightening naturally-derived ingredients calendula, rosemary and grapefruit help restore a plump, youthful complexion.</span></p> 
     </div> 
     <div class="col-sm-3 col-xs-6"> <img src="http://justbeauty-uk.s3.amazonaws.com/shillspoint2.jpg" class="img-responsive img-thumbnail img-circle margin" style="text-align: center; width: 60%;" alt="Image"> 
      <p><span style="line-height: 1.8;">Deeply penetrates the pores to remove acne-causing oil, which is also the main cause of acne outbreaks. Three more words.</span></p> 
      <p> 
       <br> 
      </p> 
     </div> 
    </div> 
</div> 

CSS:

/*Portfolio items*/ 


    #portfolio .portfolio-item { 
     margin: 0 0 15px; 
     right: 0; 
     border: 1px outset rgba(255, 255, 255, 0.6); 
    } 

    #portfolio .portfolio-item:hover { 
     transition: 0.5s; 
     box-shadow: 5px 10px 5px rgba(0, 0, 0, 0.9); 
    } 

    #portfolio .portfolio-item .portfolio-link { 
     display: block; 
     position: relative; 
     max-width: 400px; 
     margin: 0 auto; 
    } 

    #portfolio .portfolio-item .portfolio-link .portfolio-hover { 
     background: rgba(0, 0, 0, .7); 
     position: absolute; 
     width: 100%; 
     height: 100%; 
     opacity: 0; 
     transition: all ease .5s; 
     -webkit-transition: all ease .5s; 
     -moz-transition: all ease .5s, 
    } 

    #portfolio .portfolio-item .portfolio-link .portfolio-hover:hover { 
     opacity: 1; 
    } 

    #portfolio .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content { 
     position: absolute; 
     width: 100%; 
     height: 20px; 
     font-size: 20px; 
     text-align: center; 
     top: 50%; 
     margin-top: -12px; 
     color: #fff; 
    } 

    #portfolio .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content i { 
     margin-top: -12px; 
    } 

    #portfolio .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content h3, 
    #portfolio .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content h4 { 
     margin: 0; 
    } 

    #portfolio .portfolio-item .portfolio-caption { 
     max-width: 400px; 
     margin: 0 auto; 
     background-color: rgba(0, 0, 0, 0.8); 
     text-align: center; 
     padding: 25px; 
    } 

    #portfolio .portfolio-item .portfolio-caption h4 { 
     color: #fff; 
     text-transform: none; 
     margin: 0; 
    } 

    #portfolio .portfolio-item .portfolio-caption p { 
     font-family: "Droid Serif", "Helvetica Neue", Helvetica, Arial, sans-serif; 
     font-style: italic; 
     font-size: 13px; 
     margin: 0; 
    } 

    #portfolio * { 
     z-index: 2; 
    } 

    @media (min-width:767px) { 
     #portfolio .portfolio-item { 
      margin: 0 0 30px; 
     } 
    } 

答えて

1

あなたはclearfixウィッヒを使用する必要がジャンプからオブジェクトを防止するためにのみXSビューポート用に可視です。 それは次のようになります。だからここ

<div class="clearfix visible-xs-block"></div> 

は、結果のコードです:

<div id="portfolio" class="container-fluid text-center "> 
    <h2><font color="#ce2065">the shills black mask</font><br><font size="1">&nbsp;</font></h2> 
    <div class="row"> 
     <div class="col-sm-3 col-xs-6"> <img src="http://justbeauty-uk.s3.amazonaws.com/shillspoint1.jpg" class="img-responsive img-thumbnail img-circle margin" alt="Image" style="text-align: center; width: 60%;"> 
      <p style="text-align: center;"><span style="line-height: 1.8;">The latest trend in skincare.&nbsp;</span>Proven results with the word’s best selling black mask - loved by beauty bloggers, as seen on YouTube</p> 
     </div> 
     <div class="col-sm-3 col-xs-6"> <img src="http://justbeauty-uk.s3.amazonaws.com/shillspoint2.jpg" class="img-responsive img-thumbnail img-circle margin" alt="Image" style="text-align: center; width: 60%;"> 
      <p><span style="line-height: 1.8;">Activated charcoal quickly and effectively pulls blackheads from the root and aids skin regeneration. Promotes healthy skin too!</span></p> 
     </div> 
     <div class="clearfix visible-xs-block"></div> 
     <div class="col-sm-3 col-xs-6"> <img src="http://justbeauty-uk.s3.amazonaws.com/shillspoint3.jpg" class="img-responsive img-thumbnail img-circle margin" style="text-align: center; width: 60%;"> 
      <p><span style="line-height: 1.8;">Brightening naturally-derived ingredients calendula, rosemary and grapefruit help restore a plump, youthful complexion.</span></p> 
     </div> 
     <div class="col-sm-3 col-xs-6"> <img src="http://justbeauty-uk.s3.amazonaws.com/shillspoint2.jpg" class="img-responsive img-thumbnail img-circle margin" style="text-align: center; width: 60%;" alt="Image"> 
      <p><span style="line-height: 1.8;">Deeply penetrates the pores to remove acne-causing oil, which is also the main cause of acne outbreaks. Three more words.</span></p> 
      <p> 
       <br> 
      </p> 
     </div> 
    </div> 
</div> 
+0

はどうもありがとう、それが働きました。さらに詳しい説明のためにドキュメントを見てください –

+0

最後の列は、モバイルビューポートではなく、別の行にドラッグされます。 1枚目のカードの高さが2枚目の高さを超えたときに起こります。したがって、3番目の要素は「バブル」として動作し、4番目の要素を次の行にプッシュします。 – Banzay

関連する問題