如何在不隐藏内容的情况下删除双 y 滚动? 编辑:

问题描述

在 laravel 5.8 / bootstrap 4.1 应用程序中,我有翻倍 y 滚动的页面https://prnt.sc/10jf83i 我尝试删除页面滚动(内部滚动)

在 app/views/layout/member.blade.PHP 我有

  <body>
    @include('elements.member_header')
    @yield('content')
    @include('elements.member_footer')
    <script> public(); </script>
    @yield('scripts')
  </body>

在 page.blade.PHP 中:

@extends('layout.app')
@section('title',$title)
@section('description',$description)
@section('content')
<div class="member-wrapper" id="member-content">
    @include('elements.member_sidebar')
    <div class="content-wrapper">
        <div class="single-page">
            <div class="pages-heading">
                <h2>@lang('member.profile')</h2>
            </div>

如果我尝试用定义来缓解:

然后页面底部被隐藏,以防页面的动态内容高度很大。

有什么办法可以缓解吗?

谢谢!

解决方法

我会将内容包装器设置为没有高度限制。

我无法从您的代码中看出它是如何受到限制的,但我认为将 height 和 max-height 设置为 auto 应该可以工作。

根据现有规则的特殊性,您可能需要使用 !important 来覆盖。

.content-wrapper{
   height:auto !important;
   max-height:none !important;
}

编辑:

我刚刚检查并注意到您只需要删除或覆盖 .member-wrapper

中的高度
.member-wrapper {
   height: auto;
}

remove this height