css橫向 彈性盒子布局的一些屬性

來源:互聯網
上載者:User

標籤:ack   href   png   address   ble   user   flex   boot   display   

<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>Hello APP</title>
<link rel="stylesheet" type="text/css" href="./css/bootstrap-3.3.5/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="./css/api.css" />
<style type="text/css">
html,body{

}
header{
position: relative;
}
header .center{
position: relative;
width: 100px;
height: 50px;
background: url(../image/***.png);
background-size: 74px 19px;
background-repeat: no-repeat;
background-position:center center;
}
/* 橫向 彈性盒子布局 */
nav{
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient:horizontal;
-webkit-flex-flow:row;
flex-flow:row;
position: relative;
width: 100%;
height: 40px;
background-color: #e1017e;
}
nav .menu{
-webkit-box-flex:1;
-webkit-flex: 1;
flex: 1;
width:100%;
height: 40px;
line-height: 40px;
font-size:13px;color:#fff; text-align: center;
}
</style>
</head>
<body>
<header>
<div class="left"></div>
<div class="center"></div>
<div class="right"></div>
</header>
<nav>
<div class="menu">水果</div>
<div class="menu">零食</div>
<div class="menu">食材</div>
<div class="menu">牛奶</div>
<div class="menu">蔬菜</div>
</nav>
<div></div>
</body>

css橫向 彈性盒子布局的一些屬性

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.