이 그리드 레이아웃을 항상 같은 크기의 부트 스트랩 3으로 유지하려면 어떻게해야합니까?

엑순

내부에 이미지가있는 그리드 레이아웃을 만들려고합니다. 이미지가 항상 같은 크기는 아닙니다. 일부는 그리드의 레이아웃을 약간 더 작게 만드는 것 같고 모든 이미지를 얻을 수있는 방법을 찾을 수 없습니다. 같은 사이즈.

다음은 HTML입니다.

<div class="col-xs-12">
  <div class="row">
  <h2>Handheld Consoles</h2>
    <div class="col-xs-6 col-sm-6 col-md-4 col-lg-4">
    <a href="#">
      <div class="tile purple text-center">
        <h3 class="title">Nintendo 3DS</h3>
        <div class="col-xs-12"><img class="img-responsive" style="max-height:128px; max-width:128px" src="../images/3ds.png" /></div>
      </div>
    </a>
    </div>
    <div class="col-xs-6 col-sm-6 col-md-4 col-lg-4">
    <a href="#">
      <div class="tile red text-center">
        <h3 class="title">Nintendo GBA</h3>
        <div class="col-xs-12"><img class="img-responsive" style="max-height:128px; max-width:128px" src="../images/gba.png" /></div>
      </div>
    </a>
    </div>
    <div class="col-xs-6 col-sm-6 col-md-4 col-lg-4">
    <a href="#">
      <div class="tile orange text-center">
        <h3 class="title">Nintendo 64</h3>
        <div class="col-xs-12"><img class="img-responsive" style="max-height:128px; max-width:128px" src="../images/n64.png" /></div>
      </div>
    </a>
    </div>
    <div class="col-xs-6 col-sm-6 col-md-4 col-lg-4">
    <a href="#">
      <div class="tile green text-center">
        <h3 class="title">Sony PSP</h3>
        <div class="col-xs-12"><img class="img-responsive" style="max-height:128px; max-width:128px" src="../images/psp.png" /></div>
      </div>
    </a>
    </div>
  </div>
</div>

그리고 CSS.

.tile {  
    width:100%;
    display: inline-block;
    box-sizing: border-box;
    background: #fff;       
    padding: 15px;
    margin-bottom: 20px;
    color:#fff;
} 
.title {
    margin-top: 0px;
    text-align:center;
}
.purple {
    background: #5133AB;
}
.purple:hover {
    background: #3e2784;
}

여기에 이미지 설명 입력

Indubitablee

나는 당신 height이 클래스의 설정을 설정하면 .tile작동해야 한다고 믿습니다.

.tile {  
    width:100%;
    display: inline-block;
    box-sizing: border-box;
    background: #fff;       
    padding: 15px;
    margin-bottom: 20px;
    color:#fff;
    height: 200px; // or whatever height you want all the tiles to be
} 

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Related 관련 기사

뜨겁다태그

보관