用bootstrap如何在div中把图片设置成下图格式

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta http-equiv="X-UA-Compatible" content="ie=edge">

<title>Document</title>

<link rel="stylesheet" href="css/bootstrap.css">

</head>

<body>

<canvas>



</canvas>


<div class="row">

<div class="col-md-2"><img src="食品.png" alt=""></div>

<div class="col-md-2"><img src="食品.png" alt=""></div>

<div class="col-md-2"><img src="食品.png" alt=""></div>

<div class="col-md-2"><img src="食品.png" alt=""></div>

<div class="col-md-2"><img src="食品.png" alt=""></div>

<div class="col-md-2"><img src="食品.png" alt=""></div>

</div>

<div class="row">

<div class="col-md-2"><img src="食品.png" alt=""></div>

<div class="col-md-2"><img src="食品.png" alt=""></div>

<div class="col-md-2"><img src="食品.png" alt=""></div>

<div class="col-md-2"><img src="食品.png" alt=""></div>

<div class="col-md-2"><img src="食品.png" alt=""></div>

<div class="col-md-2"><img src="食品.png" alt=""></div>

</div>

<div class="row">

<div class="col-md-6">.col-md-6</div>

<div class="col-md-6">.col-md-6</div>

</div>



<script src="js/jquery-3.3.1.min.js"></script>

<script src="js/bootstrap.min.js"></script>

</body>

</html>

https://img.mukewang.com/5bf9216a00014bdd18370346.jpg

https://img3.mukewang.com/5bf9216b0001bacd06890266.jpg


Mr丶七月
浏览 1683回答 3
3回答

奋斗好青年

因为你的列表是5列的,按理说用bs布局是没办法实现的,因为bs布局栅格化都是12的倍数,你可以自己用一个呀,比如给li设置20%不就可以啦
打开App,查看更多内容
随时随地看视频慕课网APP