在bootstrap设计方案中(后台整站布局管理-->高级-->前端框架),xs设备显示2行,lg显示3行,否则显示4行。
<div class="case">$func_article(navi=Navigator,para=Case,len=12,title=10)$</div>
CSS:
#ArticleView ul,#ProductView ul{ display: flex; width: 100%; flex-direction: row; flex-wrap: wrap; justify-content:space-between;}
#ArticleView ul li,#ProductView ul li{ float: left; width:24%; max-height:300px; margin-bottom:1em;}
#ArticleView ul li .thumbs,#ProductView ul li .thumbs{ display: block; width: 100%; height:calc(100% - 2em);}
#ArticleView ul li .thumbs a,#ProductView ul li .thumbs a{ display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;}
#ArticleView ul li img,#ProductView ul li img{ padding: 0.25rem; background-color: #fff; border: 1px solid #dee2e6; border-radius: 0.25rem; max-width: 100%; max-height:100%;}
#ArticleView ul li a,#ProductView ul li a{ display: block; line-height: 2em; text-align: center;}
@media (max-width: 992px) {
#ArticleView ul li,#ProductView ul li{ width: 33%;}
}
@media (max-width: 768px) {
#ArticleView ul li,#ProductView ul li{ width: 48%;}
}
@media (max-width: 576px) {
#ArticleView ul li,#ProductView ul li { width:50%;}
} |