这是我的代码:
<body>
<div class="container-scroller">
<nav class="navbar default-layout p-0 fixed-top d-flex flex-row" style="height: 63px;">
<select id="region" onchange="initProcess();" style="position:absolute;background:#eaeaea;">
</select>
<div style="width: calc(100% - 74px); padding-left: 74px; left: 0; text-align: center; color: #fff">
<img src="images/co-logo.png" style="width: 100px; margin-top: -6px">
<h4>Dashboards</h4>
</div>
<div class="navbar-menu-wrapper d-flex align-items-right">
<button class="navbar-toggler navbar-toggler-right d-lg-none align-self-right" type="button" data-toggle="offcanvas">
<span class="mdi mdi-menu"></span>
</button>
</div>
</nav>
<div style="border: 1px solid black;" id="main" class="page-body-wrapper divfull">
<div class="div1">1</div>
<div class="div2">2</div>
</div>
</div>
</body>
那是我的CSS。我需要将两个div都设置为100%
.div1 {
border: 1px solid black;
width: 50%;
height: 100%;
background-color: blue;
float: left;
}
.div2 {
border: 1px solid black;
width: 50%;
height: 100%;
background-color: blue;
float:right;
}
有帮助吗?谢谢!