固定左侧的菜单和内容可滚动 [英] Fixed menu on left and content scrollable
本文介绍了固定左侧的菜单和内容可滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要一个固定在左侧的菜单,内容可以在右侧滚动。
I would like to have a menu which is fixed on left and the content is scrollable on the right.
我想做的就是这样的网站: http://other.wpengine.com/
What I want to do is exactly like this website: http://other.wpengine.com/
菜单固定和内容可滚动。
The menu fixed and content scrollable.
你们能帮助我吗?
提前感谢!
推荐答案
快点一个,看看吧。
<div id="left">Side menu</div>
<div id="right">Scroll
<br />Scroll
<br />Scroll
</div>
CSS:
CSS:
html, body {
height: 100%;
margin: 0;
font-size: 20px;
}
#left {
width: 20%;
height: 100%;
position: fixed;
outline: 1px solid;
background: red;
}
#right {
width: 80%;
height: auto;
outline: 1px solid;
position: absolute;
right: 0;
background: blue;
}
这篇关于固定左侧的菜单和内容可滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文