Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.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
Html 带有SVG图像的Sphinx文档获胜';不要在IE11上渲染_Html_Svg_Internet Explorer 11_Python Sphinx_Graphviz - Fatal编程技术网

Html 带有SVG图像的Sphinx文档获胜';不要在IE11上渲染

Html 带有SVG图像的Sphinx文档获胜';不要在IE11上渲染,html,svg,internet-explorer-11,python-sphinx,graphviz,Html,Svg,Internet Explorer 11,Python Sphinx,Graphviz,我目前正在构建Sphinx文档,并拥有由graphviz构建的UML图,该图生成为SVG图像。此SVG文件放置在由Sphinx自动生成的html模板中 SVG显示在Chrome和Firefox上没有问题,但是IE11没有显示它。有什么我必须调整的html中得到的图像显示 顺便说一句,同样的html和PNG图像在任何地方都可以使用(Chrome、Firefox和IE11) 这是一段html,它应该呈现svg文件 <div class="section" id="uml-class-diagr

我目前正在构建Sphinx文档,并拥有由graphviz构建的UML图,该图生成为SVG图像。此SVG文件放置在由Sphinx自动生成的html模板中

SVG显示在Chrome和Firefox上没有问题,但是IE11没有显示它。有什么我必须调整的html中得到的图像显示

顺便说一句,同样的html和PNG图像在任何地方都可以使用(Chrome、Firefox和IE11)

这是一段html,它应该呈现svg文件

<div class="section" id="uml-class-diagram">
  <h1>UML Class Diagram<a class="headerlink" href="#uml-class-diagram" title="Permalink to this headline">¶</a></h1>
  <object data="_images/graphviz- 9fe511f008ffbdc169ab624ae589b7c8a000c75f.svg" type="image/svg+xml"><p class="warning">digraph &quot;classes_kats4&quot; {SOME GRAPH TO BE DISPLAYED}</p></object>
</div>

UML类图

有向图“类”{一些要显示的图}

这是标题:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>UML Class Diagram &#8212; xx documentation</title>

  <link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

  <script type="text/javascript">
    var DOCUMENTATION_OPTIONS = {
      URL_ROOT:    './',
      VERSION:     'xx',
      COLLAPSE_INDEX: false,
      FILE_SUFFIX: '.html',
      HAS_SOURCE:  true,
      SOURCELINK_SUFFIX: '.txt'
    };
  </script>
  <script type="text/javascript" src="_static/jquery.js"></script>
  <script type="text/javascript" src="_static/underscore.js"></script>
  <script type="text/javascript" src="_static/doctools.js"></script>
</head>

UML类图&8212;xx文件
var文档\u选项={
URL_ROOT:“./”,
版本:'xx',
折叠索引:false,
文件后缀:'.html',
来源:是的,
SOURCELINK_后缀:'.txt'
};

我明白了,问题不在于SVG本身,因为我能够使用IE11打开图像

解决办法就在这里

我必须通过添加标签禁用兼容性视图:

<meta http-equiv="X-UA-Compatible" content="IE=edge">


如果SVG未显示,则很可能是SVG。请创建一个,以便我们自己可以看到。感谢您的回复,我将尝试创建一个。