此时元素符号上不允许属性宽度和高度

问题描述 投票:0回答:1

应该在SVG的width上不使用heightsymbol属性吗?

这些正在MDN示例https://developer.mozilla.org/en-US/docs/Web/SVG/Element/symbol中使用

如何解决此验证错误?

enter image description here

html svg w3c w3c-validation
1个回答
0
投票

只需链接回GitHub问题https://github.com/validator/validator/issues/930,并为遇到此问题的所有人提供反馈:

SVG 1.1 https://www.w3.org/TR/SVG11/struct.html#SymbolElement没有允许符号元素的宽度和高度。但显然是SVG2规格是https://www.w3.org/TR/SVG2/struct.html#SymbolElement

所以我将更新检查器以允许这些。

直到它是固定的,您可以直接在命令行中使用正则表达式忽略它,或者使用filterfile参数https://github.com/validator/validator#--filterfile-filename进行一系列调整。>

© www.soinside.com 2019 - 2024. All rights reserved.