位置:电子教程 > Flex Box实战教程 (如果看不到内容请使用360浏览器) 推荐学习资源
网页布局实战
九宫格实战
当前阅读教程:Flex Box实战教程 > 八个项目的布局
阅读(22555525)      收藏       赞(5685)      分享
上一篇: 七个项目的布局 下一篇: 暂无

效果图

小白教程网www.2d5.net

image.png

代码


<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>八个项目的布局</title>
</head>
 
<body>
 
<style>
.rongqi{ width:250px; height:250px; background-color:#CCC; display:flex;}
.xm{ width:70px; height:70px; background-color:#39F; margin:5px;}
</style>
<div style="flex-wrap:wrap;justify-content:space-around;">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>04</div>
  <div>05</div>
  <div>06</div>
  <div>07</div>
  <div>08</div>
  <div>09</div>
</div><hr>
 
<div style="flex-wrap:wrap;justify-content:flex-start;">
     <div   style="display:flex;">
      <div>01</div>
      <div>02</div>
      <div>03</div>
   </div>
     <div   style="display:flex; width:100%;">
      <div style="margin-left:auto;">05</div>
      <div>06</div>
   </div>
     <div   style="display:flex;">
      <div>07</div>
      <div>08</div>
      <div>09</div>
   </div>     
</div><hr>
 
<div style="flex-wrap:wrap;justify-content:flex-start;">
     <div   style="display:flex;">
      <div>01</div>
      <div>02</div>
      <div>03</div>
   </div>
     <div   style="display:flex; width:100%;">
      <div style="margin-right:auto;">04</div>
      <div>06</div>
   </div>
     <div   style="display:flex;">
      <div>07</div>
      <div>08</div>
      <div>09</div>
   </div>     
</div><hr>
 
<div style="flex-wrap:wrap;justify-content:flex-start;">
     <div   style="display:flex;">
      <div>01</div>
      <div>02</div>
      <div>03</div>
   </div>
     <div   style="display:flex;">
      <div>04</div>
      <div>05</div>
   </div>
     <div   style="display:flex;">
      <div>07</div>
      <div>08</div>
      <div>09</div>
   </div>     
</div><hr>
 
<div style="flex-wrap:wrap;justify-content:space-around;">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>04</div>
  <div>05</div>
  <div>06</div>
  <div style="margin-left:auto;">08</div>
  <div>09</div>
</div><hr>
 
<div style="flex-wrap:wrap;justify-content:space-around;">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>04</div>
  <div>05</div>
  <div>06</div>
  <div>07</div>
  <div style="margin-left:auto;">09</div>
</div><hr>
 
<div style="flex-wrap:wrap;justify-content:space-around;">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>04</div>
  <div>05</div>
  <div>06</div>
  <div style=" margin-right:auto;">07</div>
  <div>09</div>
</div><hr>
 
<div style="flex-wrap:wrap;">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>04</div>
  <div>05</div>
  <div>06</div>
  <div>07</div>
  <div>08</div>
</div><hr>
 
</body>
</html>




上一篇: 七个项目的布局 下一篇: 暂无
计算机毕业设计作品网      毕业设计文档网      小程序教程网       毕业设计资料网  |         毕业设计定制QQ:45157718(微信同号)(备注:毕设)