css - Angular Css 样式溢出滚动

标签 css angular

我正在尝试使用 Angular 表来显示数据,我可以生成数据但是当我尝试应用垂直和水平滚动时,我想为表而不是页面应用滚动条,我能够得到它完成了,但无论何时应用滚动条,表体列都会受到干扰,如下所示

https://stackblitz.com/edit/angular-lss9nk?file=src%2Fapp%2Fapp.component.html

enter image description here

最佳答案

你可以替换


     overflow: auto;


    overflow: overlay;

喜欢:


    table thead, table tbody, .trClass {
       width: 100%;
       display: block;
       /* overflow: auto; */
       overflow: overlay;
       /*overflow-y: scroll;*/ 
    }

关于css - Angular Css 样式溢出滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55512952/

相关文章:

css - 菜单在 Internet Explorer 9 中不可见

css - 使图片充当来自 actionlink 的链接

angular - 来自 Angular 的 ExpressionChangedAfterItHasBeenCheckedError

angular - 如何扩展 ngx-translate 管道

css - 为什么 Chrome 会放弃这种渐变设置?

google-chrome - 延迟 tr :hover using Chrome

css - 为什么在 CSS 中按钮和链接的样式相同但类型呈现不同?

angular - 如何专注于 Angular 中的输入

angular - 根据 URL 路由在其他组件中加载子组件

javascript - 在轮播中添加新元素会在 Angular4 中添加新行