码迷,mamicode.com
首页 > 其他好文 > 详细

弹性布局

时间:2019-04-15 18:18:24      阅读:123      评论:0      收藏:0      [点我收藏+]

标签:charset   hsi   htm   style   水果   参数   gre   bsp   bis   

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.box{
height: 500px;
background-color: bisque;
position: relative;
display: flex;
}
.box .box-left {
margin-left: 10px;
flex: 0 0 200px; /* 参数分别是 放大,缩小 初始大小 */
background-color: pink;
}
.box .box-right {
margin-left: 10px;
margin-right: 10px;
height: 100%;
background-color: green;
}
header,footer {
height: 75px;
background-color: aqua;
}
</style>
</head>
<body>
<header>
 
</header>
<div class="box">
<div class="box-left">
11
</div>
<div class="box-right">
1shishsihsishsihi是不变的沙发电视柜很多水果和客1111111111111111111111户的感慨的沙发电视柜很多水果和客户的感慨
        大苏打撒郭德纲你只是 第三个大概了解斯大林经过拉丝几个垃圾
</div>
</div>
<footer>
 
</footer>
</body>
</html>

弹性布局

标签:charset   hsi   htm   style   水果   参数   gre   bsp   bis   

原文地址:https://www.cnblogs.com/wsl-/p/10711806.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!