[英]Attribute width and height not allowed on element symbol at this point
SVG 的symbol
不應該使用width
和height
屬性嗎?
這些正在 MDN 示例中使用https://developer.mozilla.org/en-US/docs/Web/SVG/Element/symbol
如何解決此驗證錯誤?
只需鏈接回 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 。
所以我會更新檢查器以允許這些。
在修復之前,您可以直接使用正則表達式或一系列使用過濾器文件參數https://github.com/validator/validator#--filterfile-filename的正則從命令行忽略它
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.