【问题标题】:CSS scaling is not working properly in IE10CSS 缩放在 IE10 中无法正常工作
【发布时间】:2017-05-08 23:54:15
【问题描述】:

我已尝试缩放以下 SVG 路径。这在 chrome 和 firefox 中运行良好。但在 IE10 中它不起作用。有什么建议?请在下面找到我的代码。

.two {
  transition: all 2s ease-in-out 0.5s;
  -webkit-transition: all 2s ease-in-out 0.5s;
}

#scale {
  height: 150px;
  width: 100px;
  text-align: center;
  margin: 0 auto;
}

#scale {
  border: 1px blue solid;
}

.grow:hover {
  transform: scale(2.0);
  /*-ms-transform: scale(2.0);*/
  -webkit-transform: scale(2.0);
}
<svg width="220" height="220">
  <g transform="translate(110,110)">
    <path d="M0 -43.3 50 43.3 -50 43.3Z" fill="yellow" stroke="blue" stroke-width="2"
          id="scale" class="grow two" />
  </g>
</svg>

提前致谢。

【问题讨论】:

  • 正如您在实验中看到的那样,IE 不支持对 SVG 内容进行 CSS 转换。

标签: javascript html css internet-explorer svg


【解决方案1】:

如果您从 Can I Use 对于 SVG,您会发现类似这样的屏幕截图

也就是说IE10不支持&lt;svg&gt;&lt;/svg&gt;

【讨论】:

  • 点击该页面上的全部显示,您将看到 IE 10 是否支持 SVG。
  • IE 10 支持 svg。如果 IE 10 不支持 那么 svg 路径在 IE 浏览器中的显示方式。
猜你喜欢
  • 1970-01-01
  • 2016-02-05
  • 2013-04-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多