1 回答
TA贡献1834条经验 获得超8个赞
只需将overflow:hidden添加到css的body中
body{
overflow:hidden;
}
* { margin:0; padding:0; }
.main_nav {
background: #006080;
}
.logo {
margin-left: 10px;
}
.my_row > div {
border: 1px solid black;
}
.my_row {
height: 100%;
}
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<!-- NAVBAR -->
<nav class="navbar navbar-light main_nav">
<i class="fas fa-bars"></i>
<div class="logo mr-auto">
<img class="navbar-brand" src="images/michatroom.png" >
</div>
</nav>
<!-- NAVBAR END -->
<div class="container-fluid">
<div class="row my_row">
<div class="col-md-2" style='width:20%'>
www
</div>
<div class="col-md-8" style='width:60%'>
www
</div>
<div class="col-md-2" style='width:20%'>
www
</div>
</div>
</div>
<nav class="navbar navbar-bottom navbar-light bg-faded">
<a class="navbar-brand" href="#">Fixed bottom</a>
</nav>
</body>
</html>
- 1 回答
- 0 关注
- 122 浏览
添加回答
举报