您的位置:首頁> 實例代碼> CSS3實例

flex彈性布局 響應式布局

2019-10-18 11:07| 作者: admin| 查看: 4331| 評論: 0|來自: 螞蟻部落

BENZHANGJIEFENXIANGYIDUANDAIMASHILI,TASHIYONGflexDANXINGBUJUSHIXIANLEXIANGYINGSHIBUJUXIAOGUO。

更多flex彈性布局可以參閱display:flex彈性布局一章節。

DAIMASHILIRUXIA:

[HTML] 純文本查看 復制代碼运行代码
<!DOCTYPE html>
<html> 
<head> 
<meta charset=" utf-8"> 
<meta name="author" content="http://glbcf.cn/" /> 
<title>螞蟻部落</title> 
<style>
small{
  color:#999;
  font-weight:normal;
}
p{
  padding:10px;
  border:1px solid #FFC8C8;
  background:#FFE5E5;
  border-radius:4px;
  color:#A70000;
}
         
.demo-wrap{
  border:3px double #ddd;
  padding:10px;
}
 
.demo{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  flex-wrap:wrap;
}
 
.demo .item{
  width:300px;
  height:120px;
  background:#444;
  line-height:50px;
  font-size:20px;
  color:#fff;
  text-align:center;
  margin-bottom:20px;
}
</style>
</head>
<body>
<div class="demo-wrap">
  <div class="demo">
    <div class="item"></div>
    <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
  </div>
</div>
</body>
</html>

秒速赛车打不开SHANGSHUDAIMATONGGUODANXINGBUJUSHIXIANLEJIANDANDEXIANGYINGSHIXIAOGUO。

1

鮮花

握手

雷人

路過

雞蛋

剛表態過的朋友 (1 人)

最新評論

返回頂部