我正在使用MVC的默认Bootstrap。当设备屏幕位于767px至991px之间时,如何使页面向下移动到导航栏下方?
Issue screenshot attached here
最佳答案
You can handle this by two ways one by css as below
@media only screen and (min-width: 767px) and (max-width: 991px) {
.yourContainerClass{
margin-top:200px;//Here 200 is your header height for screen between 767px and 991px need to replace with actual height
}
}
Other way is using jquery as below
var headerHeight=$('.yourHeaderClass').height();
// headerHeight+=15; // maybe add an offset too?
$('.yourContainerClass').css('margin-top',headerHeight+'px');