0

In this simple example, only the section A is displayed (with Chromium Version 28.0.1500.71), not section B which is just after the svg tag.

Is it normal behaviour and why, am I doing something wrong, or is it a bug in chrome ?

<html>
<body>

<section>
    <H1>THis is section A</H1>
</section>

<div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
  <rect x="50" y="20" rx="20" ry="20" width="150" height="150" style="fill:red;stroke:black;stroke-width:5;opacity:0.5">
  </rect>

  <foreignObject x="50" y="20" width="150" height="150">
        <H2>This is H2 text embedded in svg</H2>
  </foreignObject>
</svg>
</div>

<section>
    <H1>This is section B and should be displayed</H1>
</section>


</body>
</html>
4

1 回答 1

0

Firefox 会相应地显示数据。所以这是 Chromium 版本 28.0.1500.71 中的一个错误。

编辑:正如评论者所说,放置宽度和/或高度足以进行正确的渲染。因此,话虽如此,它只是一个小错误。

于 2013-09-19T06:35:01.087 回答