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

效果图

小白教程网www.2d5.net

image.png

代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>六个项目的布局(1)</title>
</head>
<body>
 
<div style="flex-wrap:wrap;justify-content:space-around;align-content:space-between;flex-direction: column;">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>04</div>
  <div>05</div>
  <div>06</div>
</div><hr>
 
<div style="flex-wrap:wrap;justify-content:space-around;align-content:flex-end;flex-direction: column;">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>04</div>
  <div>05</div>
  <div>06</div>
</div><hr>
 
<div style="flex-wrap:wrap;justify-content:space-around;align-content:flex-start;flex-direction: column;">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>04</div>
  <div>05</div>
  <div>06</div>
</div><hr>
 
<div style="flex-wrap:wrap;align-items: flex-start;align-content: space-between;">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>07</div>
  <div>08</div>
  <div>09</div>
</div><hr>
 
 
<div style="flex-wrap:wrap;align-items: flex-start;align-content: flex-start;">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>04</div>
  <div>05</div>
  <div>06</div>
</div><hr>
 
<div style="flex-wrap:wrap;align-items: flex-start;">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>04</div>
  <div>05</div>
  <div>06</div>
</div><hr>
 
<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;">
      <div>04</div>
      <div>05</div>
      <div>06</div>
   </div>
     <div   style="display:flex;">
      <div>07</div>
      <div>08</div>
      <div>09</div>
   </div>     
</div><hr>
 
</body>
</html>




上一篇: 五个项目的布局 下一篇: 七个项目的布局
毕业设计网             广告联系QQ:45157718(微信同号)