html - 使组合高度等于浏览器窗口的高度

标签 html css

http://featuredfotografer.com/

.Codemirror div 与#header div 组合占用的高度超过了浏览器的高度。我怎样才能使它们的组合高度达到浏览器窗口的 100%,这样我就没有滚动条了?

最佳答案

making combined height equal to the height of the browser window

只需添加这段代码。它会将您的内容设置为浏览器窗口的 100%

body,html {
   height: 100%;
}

你也可以查看this .

关于html - 使组合高度等于浏览器窗口的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11209692/

相关文章:

php - 如何使用 php 从 HTML 中删除 <p> 标签及其内容

java - JSP 输入到 servlet 为空

javascript - 检查字符串的第一个字母是否= char

html - 在不同的分辨率上 Bootstrap 小差距

html - 如何停止在 Opencart 中调整图像大小

html - html站点上的Node.js mysql显示表

php - 简单的联系表格不起作用

html - 具有持久纵横比的响应式 CSS 网格

html - 具有边距对齐问题的 Flexbox

javascript - 将按钮设置为单击时激活?