如果您在IE10或Firefox Mac(最新版本)中查看此链接,您会看到图标未显示:
http://andymatthews.net/code/jQuery-Mobile-Icon-Pack/
这是JQM 1.4.0的最新版本。至少在Firefox中,问题似乎已经归结为XML解析错误......未关闭的令牌。我不知道这意味着什么或如何解决它。
XML Parsing Error: unclosed token Location: data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%20%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%20500%20500%22%3E%20\9%20%3Cpath%20d%3D%22M214.286%20401.786v-303.571q-41.294%200-76.172%2020.368t-55.246%2055.246-20.368%2076.172%2020.368%2076.172%2055.246%2055.246%2076.172%2020.368zM428.571%20250q0%2058.315-28.739%20107.562t-77.985%2077.985-107.562%2028.739-107.562-28.739-77.985-77.985-28.739-107.562%2028.739-107.562%2077.985-77.985%20107.562-28.739%20107.562%2028.739%2077.985%2077.985%2028.739%20107.562z%22%20fill%3D%22#ffffff%22%20%2F%3E%20%3C%2Fsvg%3E Line Number 1, Column 186:<?xml version="1.0" encoding="utf-8"?> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 500 500"> \9 <path d="M214.286 401.786v-303.571q-41.294 0-76.172 20.368t-55.246 55.246-20.368 76.172 20.368 76.172 55.246 55.246 76.172 20.368zM428.571 250q0 58.315-28.739 107.562t-77.985 77.985-107.562 28.739-107.562-28.739-77.985-77.985-28.739-107.562 28.739-107.562 77.985-77.985 107.562-28.739 107.562 28.739 77.985 77.985 28.739 107.562z" fill=" -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
所以这似乎是数据URI结构的问题?所有这些冲刺究竟是什么?
当然,这些图标在我的网站上也不起作用,并且使用jqm-icon-pack-fa.css文件可以防止使用默认的JQM图标。
最奇怪的是,我似乎是互联网上唯一抱怨此问题的人。有没有人让这个跨浏览器工作?我在这里见过其他人similar problems,但除了相同的浏览器有问题外,这似乎无关。
答案 0 :(得分:3)
我遇到了完全相同的问题,结果证明它是十六进制颜色中的#符号(在你的例子中,#ffffff到了最后)。将#更改为%23,它将起作用。
来源:https://github.com/commadelimited/jQuery-Mobile-Icon-Pack/issues/62#issuecomment-35314269