<!DOCTYPE html> <html> <style> .block { padding-top: 30%; margin-top: 3%; border-radius: 10%; background-color: orange; width: 30%; } .container-flex2 { display: flex; flex-wrap: wrap; justify-content: space-around; } </style> <body> <div class="container-flex2"> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> </div> </body> </html>
相关文章推荐:
CSS3中display属性的Flex布局的简单介绍
css实现布局时可以用的几个技巧(代码)以上就是css中Flex布局如何实现九宫格的样式(代码)的详细内容,更多请关注php中文网其它相关文章!
……