Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 角度CDK虚拟滚动-表格中的文本在IE11中模糊_Angular_Angular Cdk - Fatal编程技术网

Angular 角度CDK虚拟滚动-表格中的文本在IE11中模糊

Angular 角度CDK虚拟滚动-表格中的文本在IE11中模糊,angular,angular-cdk,Angular,Angular Cdk,我使用的是Angular 7和Angular/cdk 7.3.7版。 我创建了与本教程中的表大致相同的表: 虽然表格中的文本在Chome和Edge中看起来很清晰,但在IE11中看起来很模糊 有人知道它为什么会发生或如何修复吗 谢谢你的帮助 这是表格: <cdk-virtual-scroll-viewport itemSize="24" class="cdk-content"> <table class="list"> <thead> <tr

我使用的是Angular 7和Angular/cdk 7.3.7版。 我创建了与本教程中的表大致相同的表:

虽然表格中的文本在Chome和Edge中看起来很清晰,但在IE11中看起来很模糊

有人知道它为什么会发生或如何修复吗

谢谢你的帮助

这是表格:

<cdk-virtual-scroll-viewport itemSize="24" class="cdk-content">
 <table class="list">
  <thead>
   <tr>
    <th>HEADER1</th>
    <th>HEADER2</th>
    <th>HEADER3</th>
    <th>HEADER4</th>
   </tr>
 </thead>
 <tbody>
  <ng-container *cdkVirtualFor="let rec of record_list;">
    <tr>
      <td>{{rec.item1}}</td>
      <td>{{rec.item2}}</td>
      <td>{{rec.item3}}</td>
      <td>{{rec.item4}}</td>
    </tr>
   </ng-container>
  </tbody>
 </table>
</cdk-virtual-scroll-viewport>

校长1
校长2
校长3
校长4
{{rec.item1}
{{rec.item2}
{{rec.item3}
{{rec.item4}}

通过添加css属性修复了它,如下所示

.cdk-content{
 ...
 transform : none;
 ...
}
默认情况下,cdk虚拟滚动视口的“变换”值设置为translateZ(0px),这似乎会使文本模糊

 cdk-virtual-scroll-viewport {
 ...
 transform: none;
 ...
 }

将变换none与其他值一起放置。请注意,在cdk虚拟滚动视口的开头没有“.”,我也遇到了这个问题。您发现修复了吗?@Koronag是的,这似乎是由cdk虚拟滚动视口的默认css属性“transform:translateZ(0px);”引起的。通过将“变换”设置为“无”,文本不再模糊。