-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第十四题:实现一个左边固定宽,右边自适应的左右布局 #14
Labels
CSS
层叠样式表
Comments
BFC实现
Flex实现
float 布局
calc 布局
|
position布局<body>
<div class='outside'>
<div class="left"></div>
<div class="right"></div>
</div>
</body>
<style>
.outside {
width: 100%;
height: 300px;
position: relative;
}
.left {
width: 100px;
height: 100%;
background: blue;
}
.right {
position: absolute;
left: 100px;
right: 0;
top: 0;
bottom: 0;
background: red;
}
</style> |
也可以使用margin 为负值实现 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: