作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我将如何设计一个具有固定高度的页眉和页脚(附加到浏览器窗口的顶部和底部)但中间扩展的网站。滚动条将仅用于中间部分(图表中的橙色部分),因此页面的其余部分永远不需要滚动。我在下面画了一个模型来解释得更清楚。
理想情况下,它需要完全用 CSS 和 HTML 实现(没有 javascript fiddles!)。我已经解决了这个问题,但我不能强制橙色部分在未满时(无论内容是什么)填满剩余空间,如果溢出则开始滚动。
最佳答案
我认为这就是您想要的:
HTML:
<div id="header">Patrick</div>
<div id="content">..</div>
<div id="footer">Beardmore</div>
CSS:
html, body {
margin: 0;
padding: 0;
border: 0;
overflow: hidden
}
#header, #content, #footer {
position: absolute;
left: 0;
width: 100%
}
#header {
top: 0;
height: 100px;
background: #ccc
}
#content {
top: 100px;
bottom: 100px;
overflow-y: auto
}
#footer {
bottom: 0;
height: 100px;
background: #ccc
}
关于html - CSS 中的扩展中间层,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5069166/
我有一个训练有素的 Keras 模型,我想要: 1)用相同但没有偏差的Con2D层替换Con2D层。 2) 在第一次激活之前添加 BatchNormalization 层 我该怎么做? def ker
请耐心等待,我是 MVC 和 WCF 的新手。我已经有一组公开我的 BLL 的服务 (WCF),我正在尝试从我的 MVC.net Web 应用程序中使用这些服务,但我不确定如何在此处执行安全操作。 这
我是一名优秀的程序员,十分优秀!