gpt4 book ai didi

xml - SVG : AttValue: "or ' expected 的问题

转载 作者:行者123 更新时间:2023-12-04 08:34:29 33 4
gpt4 key购买 nike

关闭。这个问题是not reproducible or was caused by typos .它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。

10 个月前关闭。




Improve this question




我是第一次学习 SVG 图像,我正在关注在线指南(链接是意大利语,但如果您有兴趣,请访问:https://www.html.it/pag/31776/le-figure-geometriche-principali/)
但是我有一些我无法解决的问题。
我试图在我的 svg 文件中插入简单的几何形状,但我总是收到此错误消息,即使我一次插入一个形状:

This page contains the following errors: error on line 8 at column 11:AttValue: " or ' expected Below is a rendering of the page up to thefirst error.


我正在尝试的代码是这样的:

<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//Dtd SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/Dtd/svg11.dtd">

<svg width="800" height="600" viewBox="0 0 800 600" preserveAspectratio="xMinYMin" enable-background="new 0 0 800 600"
version="1.1" xmlns="http://www.w3.org/2000/svg">


<line x1=”10" y1=”10" x2=”100" y2=”100" style=”stroke:red”/>

<polyline points=”30,30 50,50 90,10" style=”stroke:red;fill:none”/>

<circle cx=”100" cy=”100" r=”50" style=”stroke:red;fill:#ff00ee”/>

<rect x=”10" y=”10" rx=”2" ry=”2" width=”100" height=”50" style=”fill:red”/>

<ellipse cx=”100" cy=”100" rx=”70" ry=”50" style=”fill:red”/

</svg>

错误在哪里?
我该如何解决?
请记住我刚开始学习,尽量像 child 一样解释XD
非常感谢!

最佳答案

正如评论中已经提到的,您使用了两个单引号 而不是双引号 " 在下面的代码中,单引号替换为双引号。错误信息不再显示

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" 
xmlns:xlink="http://www.w3.org/1999/xlink">
<line x1="10" y1="10" x2="00" y2="100" style="stroke:red"/>

<polyline points="30,30 50,50 90,10" style="stroke:red;fill:none"/>

<circle cx="100" cy="100" r="50" style="stroke:red;fill:#ff00ee"/>

<rect x="10" y="10" rx="2" ry="2" width="100" height="50" style="fill:red"/>

<ellipse cx="100" cy="100" rx="70" ry="50" style="fill:red"/>

</svg>

关于xml - SVG : AttValue: "or ' expected 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64863981/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com