<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
html,
body {
height: 100%;
}
.box {
height: 100%;
}
.box1 {
width: 100px;
height: 100%;
background: #0000ff;
}
.box2 {
position: fixed;
height: 100%;
top: 0;
left: 100px;
right: 0;
background: pink;
}
</style>
</head>
<body>
<div class="box">
<div class="box1"></div>
<div class="box2"></div>
</div>
</body>
</html>
两栏布局方法----固定定位
最新推荐文章于 2024-08-17 14:58:02 发布