科尔多瓦Android渲染问题

时间:2019-08-14 10:10:11

标签: html css angular cordova

我有一个托管在Cordova中的Angular应用程序。 在Android平板电脑中启动应用程序时,存在一些渲染问题。 有一个div(矩形)元素,填充了背景色(灰色)。该div元素在由用户转换(缩放)后,子div元素的背景颜色无法正确呈现。

在以下代码中,“ x”,“ y”,“ width”和“ height”属性在组件中定义,并绑定到CSS样式。 我试过应用

的硬件加速技术

https://blog.teamtreehouse.com/increase-your-sites-performance-with-hardware-accelerated-css

但是它不起作用。

<div [style.backgroundColor]='grey'
      [style.left.px]="x"
      [style.top.px]="y"
      [style.width.px]="width"
      [style.height.px]="height">
    <div style='width: 100%; height: 100%, position: absolute, background-color: purple'>   
    </div>        
</div>

这就是我在横向模式下看到的。

enter image description here

其中父div元素中的背景色(紫色)未完全填充。 当我进入人像模式时,看起来不错。 我在哪里做错了?有人可以帮忙吗?

谢谢。

0 个答案:

没有答案