- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有一个包含 <header>
的 HTML 页面, <section>
和 <footer>
.我想将 section min-height 设置为 screen height - (header + footer height)
.这可能吗?
section{
min-height: screen-height-(header + footer height)
}
最佳答案
使用预处理器。 SASS/LESS/手写笔。
LESS 示例:
@base: 5%;
@filler: @base * 2;
@other: @base + @filler;
color: #888 / 4;
background-color: @base-color + #111;
height: 100% / 2 + @filler;
但是,如果您想根据屏幕高度进行操作,预处理器无法检测屏幕高度,您将不得不为此使用 JavaScript/jQuery。
关于 "screen height - (header + footer height)"的 CSS 表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27646444/
鉴于下面的基本 HTML 结构(我无法更改),我知道我可以使用此 CSS 扩展主要内容 div: html, body { height: 100%; } body { display: fl
这应该类似于 iOS tableview 页脚,也可以在各种网站中看到(粘性页脚)。 我想实现以下目标: A 是具有可变行数的 RecyclerView。 当 A 小于屏幕(或父级)尺寸时,B(页脚)
我有一个 Bootstrap 面板,底部有两个按钮: {{ Form::open( array('route' => array('dogs.edit', $dog->id)
我是一名优秀的程序员,十分优秀!