body {
background-color: #e4e5e7!important;/* ?? [email protected] with the code snippet ? */
}
ul {
list-style: none;
display: flex;
flex-wrap: wrap;
padding:0;
}
li {
width: 20%;
margin: 20px 0 0;
;
}
li div.test-wrapper {
background-color: #fff;
margin-bottom: 25px
}
li div.test-wrapper a,
li div.test-wrapper {
display: flex;
height: 100%;
}
li div.test-wrapper a {
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap-theme.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<ul>
<li class="col-sm-3">
<div class="test-wrapper text-center">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque leo lacus, congue at arcu at, gravida congue orci. Fusce id tempor orci, nec efficitur ex. Mauris vitae nunc dui. Donec dui justo, pulvinar ut congue vitae, tempor porta sem. Q
</div>
</li>
<li class="col-sm-3">
<div class="test-wrapper text-center">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque leo lacus, congue at arcu at, gravida congue orci. Fusce id tempor orci, nec efficitur ex. Mauris vitae nunc dui. Donec dui justo, pulvinar ut congue vitae, tempor porta sem. Q
</div>
</li>
<li class="col-sm-3">
<div class="test-wrapper text-center">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque leo lacus, congue at arcu at, gravida congue orci. Fusce id tempor orci, nec efficitur ex. Mauris vitae nunc dui. Donec dui justo, pulvinar ut congue vitae, tempor porta sem. Q
</div>
</li>
<li class="col-sm-3">
<div class="test-wrapper text-center">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque leo lacus, congue at arcu at, gravida congue orci. Fusce id tempor orci, nec efficitur ex. Mauris vitae nunc dui. Donec dui justo, pulvinar ut congue vitae, tempor porta sem. Q
</div>
</li>
<li class="col-sm-3">
<div class="test-wrapper text-center">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque leo lacus, congue at arcu at, gravida congue orci. Fusce id tempor orci, nec efficitur ex. Mauris vitae nunc dui. Donec dui justo, pulvinar ut congue vitae, tempor porta sem. Q
</div>
</li>
<li class="col-sm-3">
<div class="test-wrapper text-center">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque leo lacus, congue at arcu at, gravida congue orci. Fusce id tempor orci, nec efficitur ex. Mauris vitae nunc dui. Donec dui justo, pulvinar ut congue vitae, tempor porta sem. Q
</div>
</li>
<li class="col-sm-3">
<div class="test-wrapper text-center">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque leo lacus, congue at arcu at, gravida congue orci. Fusce id tempor orci, nec efficitur ex. Mauris vitae nunc dui. Donec dui justo, pulvinar ut congue vitae, tempor porta sem. Q
</div>
</li>
<li class="col-sm-3">
<div class="test-wrapper text-center">
<a href="#">this is button</a>
</div>
</li>
</ul>
あなたはCSSで 'li'要素に固定された高さを設定するか、スクリプトを使用して高さを計算して設定することができ、私は、スクリプトがここで必要とされていると思います。 –
はい私はオプションがなく、おそらくスクリプトで高さを計算し、すべてが応答するのでボタンに渡す必要があります – user1751287