IE不是绘画元素 [英] IE is not painting elements
问题描述
我有一个角度应用程序,它使用SVG绘制水平条形图和垂直条形图。
I have an angular app that is using SVG to draw a horizontal bar chart and a vertical bar chart.
但是,水平条形图未被绘制。水平SVG rects在DOM中,如果我简单地切换回CSS属性,它将正确绘制。但他们最初不会画画。
However, the horizontal bar chart is not being painted. The horizontal SVG rects are in the DOM and will paint correctly if I simply toggle off and back on a CSS property. But they will not paint initially.
推荐答案
在我的应用程序中,我使用的是Angular Material。 Angular Material具有以下CSS选择器:
In my application I was using Angular Material. Angular Material has the following CSS selector:
md-menu-content[width="3"] {
min-width: 168px; }
我删除了上面的CSS和我的水平条形图画。
I removed the above CSS and my Horizontal Bar chart paints.
我的猜测是IE不适用于非本机DOM元素选择器,因为我在同一宽度属性(在我的水平条形图中)动画,这个选择器正在查询它打破了IE的油漆算法。
My guess is that IE does not work well with non-native DOM element selectors and that because I was animating on the same width attribute(in my horizontal bar chart) that this selector was querying it broke IE's paint algorithm.
这篇关于IE不是绘画元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!