html - 使垂直菜单高度适合 100%

标签 html css

我画了一个草图 http://i.imgur.com/cx3jXPu.jpg因此侧边栏必须与内容侧边栏一起向下拖动。

最佳答案

它的高度应该是 100% 以及它所有的父 div

html, body{
    height:100%;
    width: 100%;
}
.container{
    width:100%;
    height:100%;
    border:1px solid red;
}
.sidebar{
    width:25%;
    height:100%;
    background:gray;
}

http://jsfiddle.net/ahmedskaya/Bek9L/1863/

关于html - 使垂直菜单高度适合 100%,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22654776/

相关文章:

jquery - 带关闭按钮的工具提示

javascript - 自动生成下拉列表

CSS 条纹背景,带线性渐变, strip 之间不模糊

html - 如何使用带有外部模板的 Cyclejs

javascript - 在没有 iframe 的情况下嵌入 HTML5 YouTube 视频?

css - 当我们将 float 赋予父元素以清除 float 时,为什么 float 与其他选项的行为不同?

javascript - CSS : Div placement in column

html - 如何使菜单固定在左上角,草率的设计?

javascript - 传递、访问或预填充数据时遇到问题 - Vue.js/Firestore

html - 将标签和自动调整大小输入保持在同一行