<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>html-demo</title>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
</script>
<script>
</script>
<style>
* {
margin: 0;
padding: 0;
}
html,
body {
margin: 0;
padding: 0;
height: 100%;
}
.main {
display: flex;
flex-direction: row;
height: 100%;
}
.left {
width: 100px;
height: 100%;
background: red;
}
.right {
flex: 1;
height: 100%;
background: pink;
}
</style>
</head>
<body>
<div class="main">
<div class="left">11</div>
<div class="right">22</div>
</div>
</body>
</html>
html 模板, flex宽度自适应, 消除html中body上面的空白
最新推荐文章于 2022-05-14 11:11:05 发布