全高部分单页 [英] Full height sections single page
本文介绍了全高部分单页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Bootstrap创建一个响应式网站.
I am creating a responsive web site using Bootstrap.
页面很简单,但是同一页面上需要不同的部分,每个部分的高度为100%屏幕高度,因此链接到部分锚点将以100%的高度和宽度显示该部分.宽度没有问题,但是不会堆叠多个高度实例.有关此问题的任何提示吗?
The page is simple, yet there is a need for different sections on the same page, each section having a height of 100% screen height, så linking to a section anchor displays that section in 100% height and width. Width is no problem, but having multiple instances of height doesn't stack. Any tips on this issue?
推荐答案
找到了一个解决方案-将其放在jQuery分数中,您可以在其中侦听调整大小/加载事件.
Found a solution - put this inside a jQuery score where you listen on resizing/load events.
$('page').css('min-height',$(window).height()+'px');
页面是您希望定位的div部分.
Where page is the div section you whish to target.
这篇关于全高部分单页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文