[英]Angular cdk-virtual-scroll-viewport: scroll up is not working
[英]Height and width in Percentage is not working for cdk-virtual-scroll-viewport
我的應用程序中有一個cdk-virtual-scroll-viewport
,其中高度和寬度以百分比形式提供。
<div class="wrapper">
<cdk-virtual-scroll-viewport itemSize="5" class="table-viewport">
...
.wrapper {
height: 100%;
width: 100%;
}
cdk-virtual-scroll-viewport {
height: 80%;
width: 80%;
border: 1px solid #e6e8f0;
border-radius: 0.5%;
/* box-shadow: 1px 100px black; */
}
但它不起作用。 屏幕上沒有任何可見的東西。 當我們在px
中給出height
和width
時,它就起作用了。
cdk-virtual-scroll-viewport {
height: 800px;
width: 1300px;
border: 1px solid #e6e8f0;
border-radius: 0.5%;
/* box-shadow: 1px 100px black; */
}
誰能弄清楚發生了什么?
overscroll-behavior css
屬性設置瀏覽器到達滾動區域邊界時的行為。 它是overscroll-behavior-x
和overscroll-behavior-y
的簡寫。
overscroll-behavior: auto;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.