如何做一个流体包裹分隔高度? [英] How do you make a fluid wrapping divider height?

查看:147
本文介绍了如何做一个流体包裹分隔高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的朋友做了这个,但他不会告诉我他是怎么做的,但

my friend did this but he wont tell me how he did it, but

我想要我的包装分隔线具有流畅的高度。

I want my wrapper divider to have a fluid height.

所以它应该从顶部和底部有一个确切的边距30px,然后包装器本身可以扩展与浏览器的高度,但它将始终是一个特定的距离从顶部

So it should have an exact margin from the top and from the bottom at 30px, and then the wrapper itself can expand related to the browser height, but it will always be a specific distance from the top and bottom of the browser.

也可以设置一个最小高度,这样它就不会被过度挤压,并成为一个可滚动的页面?

And is it also possible to make a minimum height so it doesn't get squished too much, and becomes a scrollable page?

推荐答案

您的分隔符应该具有以下属性。这将给它一个30px的顶部和底部边距,它会根据您的窗口高度进行调整。

Your divider should have the following properties. This will give it a 30px top and bottom margin and it will adjust with your window height.

.divider{
 position:absolute;
 top:30px;
 bottom:30px;
}

这篇关于如何做一个流体包裹分隔高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆