我試圖創建一個響應顯示寬度的紙牌隊列。使用css html的響應式紙牌設計
我想這個隊列是適合顯示寬度,使無卡獲得從顯示器丟失。我想涵蓋手機,平板電腦和桌面的傳統寬度。
我也想把這個隊列調整到中心位置,以免看起來不好。
<div>
<img src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
<img class="rest" src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
<img class="rest" src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
<img class="rest" src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
<img class="rest" src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
<img class="rest" src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
<img class="rest" src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
<img class="rest" src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
<img class="rest" src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
<img class="rest" src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
<img class="rest" src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
<img class="rest" src="http://chetart.com/blog/wp-content/uploads/2012/05/playing-card-back.jpg" alt="">
</div>
div{
width:100%;
}
img{
display: inline-block;
height: 200px;
}
.rest{
margin-left: -102px;
}
固定的卡的數量? –
是固定的。 21張牌。 @HashemQolami –