左边固定宽度,右边自适应屏幕铺满

六月ゝ 毕业季﹏ 提交于 2020-01-16 10:41:33

<html>
<head>
<title>左右布局</title>
<style>
.left{
width:200px;
height:100%;
float:left;
background-color: aquamarine;
}
.right{
width:calc(100% - 200px);
height:100%;
float:right;
background-color: aqua;
}
.banner {
padding: 15.15% 0 0;
position: relative;
}
.banner > img {
position: absolute;
width: 100%;
height: 100%;
left: 0; top: 0;
}
</style>
</head>
<body>
<div class='left'></div>
<div class='right'>


</div>
</body>
</html>

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!