我想实现一个特定的布局,但当我try 这样做,它得到了所有的秩序.我希望它像这张照片一样.有人能帮忙吗?
body {
margin: 0px;
}
.top {
width: 100%;
background-color: blue;
height: 40px;
color: white;
}
.content {
margin-left: 100px;
height: 100%;
}
.sidebar {
width: 100px;
position: fixed;
height: 100%;
background-color: red;
}
.footer {
height: 40px;
width: 100%;
background-color: black;
}
<div class="sidebar"></div>
<div class="content">
<div class="top">My website example</div>
<p>I start here</p>
</div>
<div class="footer"></div>