<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>第七章浮动</title> <style type="text/css"> .a_1{ border-style: inset; border-width: 10px 20px 30px 40px; border-color: brown; width:1000px; height: 500px; font-size: 80px; margin: 0px auto; background-color: aqua; display: flex; } .a_2{ width: 100px; height: 100px; background-color: black; margin: 15px; } </style> </head> <body> <div class="a_1"> <div class="a_2"></div> <div class="a_2"></div> <div class="a_2"></div> <div class="a_2"></div> <div class="a_2"></div> <div class="a_2"></div> <div class="a_2"></div> <div class="a_2"></div> </div> </body> </html>