正如您從附件中看到的那樣,如果第一列的文本比正確的文本更多,那麼它會導致毛刺。看附件的截圖。帶文本的自舉行故障
如何在Bootstrap中解決此問題?
演示: https://jsfiddle.net/oLderkuo/
/* Latest compiled and minified CSS included as External Resource*/
/* Optional theme */
@import url('//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css');
body {
margin: 10px;
}
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<div class="container">
<div class="portfolio-gallery row">
\t \t <div class='gallery-item col-md-4 col-sm-6 col-xs-12'>
\t \t \t <span class='sub-gallery-icon'>
\t \t \t \t <a href='#' >
\t \t \t \t \t <img width="300" height="200" src="http://placehold.it/300x200" class="gallery-thumb-img wp-post-image" alt="" />
\t \t \t \t </a>
\t \t \t </span>
\t \t \t <span class='wp-caption-text gallery-caption'><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget leo leo. Sed sed pretium quam, ut bibendum libero. In semper arcu eget faucibus hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget leo leo. Sed sed pretium quam, ut bibendum libero. In semper arcu eget faucibus hendrerit. Nullam eget leo leo. Sed sed pretium quam, ut bibendum libero. In semper arcu eget faucibus hendrerit. In semper arcu eget faucibus hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget leo leo. Sed sed pretium quam, ut bibendum libero. In semper arcu eget faucibus hendrerit.
\t \t \t </span>
\t \t </div>
\t \t <div class='gallery-item col-md-4 col-sm-6 col-xs-12'>
\t \t \t <span class='sub-gallery-icon'>
\t \t \t \t <a href='#' >
\t \t \t \t \t <img width="300" height="200" src="http://placehold.it/300x200" class="gallery-thumb-img wp-post-image" alt="" />
\t \t \t \t </a>
\t \t \t </span>
\t \t \t <span class='wp-caption-text gallery-caption'><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget leo leo. Sed sed pretium quam, ut bibendum libero. In semper arcu eget faucibus hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\t \t \t </span>
\t \t </div>
\t \t <div class='gallery-item col-md-4 col-sm-6 col-xs-12'>
\t \t \t <span class='sub-gallery-icon'>
\t \t \t \t <a href='#' >
\t \t \t \t \t <img width="300" height="200" src="http://placehold.it/300x200" class="gallery-thumb-img wp-post-image" alt="" />
\t \t \t \t </a>
\t \t \t </span>
\t \t \t <span class='wp-caption-text gallery-caption'><br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget leo leo. Sed sed pretium quam, ut bibendum libero. In semper arcu eget faucibus hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget leo leo. Sed sed pretium quam, ut bibendum libero. In semper arcu eget faucibus hendrerit.
\t \t \t </span>
\t \t </div>
</div>
你嘗試:文本對齊:理由; ?在你的CSS? –
@NathanSchwarz我在這裏嘗試過:https://jsfiddle.net/oLderkuo/1/,但我不認爲這將解決問題。 – michaelmcgurk
好吧,首先把bootdtrap放在第一位,然後按照寬度進行排序:XS - MD - LG –