有没有办法用CSS制作带有粘性第一列的棱角材质?
现在就可以编辑Stackblitz code了
我尝试过调整这个解决方案https://jsfiddle.net/zinoui/BmLpV/,但是由于某些原因,第一列被抛出了表本身,并且它失去了样式。
<div class="zui-wrapper">
<div class="zui-scroller">
<table class="zui-table">
<thead>
<tr>
<th class="zui-sticky-col">Name</th>..........
</tr>
</thead>
<tbody>
<tr>
<td class="zui-sticky-col">DeMarcus Cousins</td>
.......
<tr>
</tbody>
</table>
</div>
</div>
.zui-scroller {
margin-left: 141px;
overflow-x: scroll;
overflow-y: visible;
padding-bottom: 5px;
width: 300px;
}
.zui-table .zui-sticky-col {
border-left: solid 1px #DDEFEF;
border-right: solid 1px #DDEFEF;
left: 0;
position: absolute;
top: auto;
width: 120px;
}发布于 2018-07-31 17:28:38
发布于 2019-07-29 15:19:36
td:first-child, th:first-child {
position:sticky;
left:0;
z-index:1;
background-color:grey;
}发布于 2018-11-12 18:50:46
我已经使用stickyEnd实现了这一点,如下所示。
<ng-container matColumnDef="12" class="white-bg" stickyEnd>
</ng-container>https://stackoverflow.com/questions/50261150
复制相似问题