css - 表格标题位置粘滞在模板 Web 组件中不起作用?
问题描述
我有一个表格 Web 组件,其中的标题需要粘性,但是当我尝试应用 css 时它不起作用。
scss
.table-section{
height: calc(100vh - 252px);
overflow: auto;
overflow-x: hidden;
width: 100%;
}
ezee-table {
table{
position: relative;
}
}
th{
position: sticky;
position: -webkit-sticky;
top: 0; /* required */
z-index: 1;
}
解决方案
推荐阅读
- reactjs - 反应和对象 - 类型错误:无法读取未定义的属性“地图”
- c# - Azure 函数 QueueTrigger 和 int 消息
- java - Java versions don't match between command prompt and STS
- java - Opentelemetry java Automatic Instrumentation with zipkin exporter 选项正在使用 OtlpGrpcSpanExporter
- r - 在两个变量的比例之间创建一个图
- python - 在 python 中安装 arpreq 时如何修复错误?
- php - 连接到 XDebug 3 时 Netbeans 12.2 挂起
- rust - 有没有办法查看我的项目中可选依赖另一个 crate 的所有 crate?
- javascript - 即使您无权访问 Google 站点,如何继续运行脚本?
- flutter - 无法在 IOS 上运行应用程序,有关 Flutter 中 pod 的问题