2

svg 文件 pushpop.svg 不会被显示。代码是:

<html>
<head>
</head>
<body style="background:black;color:white">

<h1>Primitive operations :-</>
<ol>
<li>Push :- Place the new item on stack.Value of top gets incremented by one.</li>
<li>Pop :- Remove the item from top of the stack.Value of top decreases by one.</li>
</ol>
<img src="pushpop.svg" alt="Kiwi standing on oval">

</body>
</html>
4

2 回答 2

0

查看您的代码,我建议进行以下两个编辑。

关闭您的 H1 标签!听起来很简单,打开标签会产生连锁反应

此外,您没有 doctype,这取决于浏览器,这也可能会影响 svg。

试试这个代码

<!DOCTYPE html>
<html>
<head></head>
<body style="background:black;color:white">

<h1>Primitive operations :-</h1>
<ol>
    <li>Push :- Place the new item on stack.Value of top gets incremented by one.</li>
    <li>Pop :- Remove the item from top of the stack.Value of top decreases by one.</li>
</ol>
<img src="pushpop.svg" alt="Kiwi standing on oval">
</body>
</html>
于 2013-11-11T20:02:58.823 回答
-1

尝试:

<html>
<head>
</head>
<body style="background:black;color:white">

<h1>Primitive operations</h1>
<ol>
<li>Push :- Place the new item on stack.Value of top gets incremented by one.</li>
<li>Pop :- Remove the item from top of the stack.Value of top decreases by one.</li>
</ol>

<embed src="pushpop.svg" type="image/svg+xml" />
</body>
</html>

http://www.w3schools.com/svg/svg_inhtml.asp

于 2013-11-11T19:54:18.777 回答