SVG报错error on line 39 at column 26: Namespace prefix xlink for href on script is not defined
SVG写入image标签时,发现在google和火狐上无法显示,且报错: Namespace prefix xlink for href on script is not defined
后经查询,找到了解决办法:
在命名空间上添加:
xmlns:xlink=http://www.w3.org/1999/xlink
实例:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" > <circle cx="" cy="" r="" stroke="black"
stroke-width="" fill="red"/> <image xlink:href="happy-every-day.jpg" width="" height="" /> </svg>
其中红色的命名空间是使google、火狐浏览器兼容SVG的,蓝色的部分是image标签适应google或火狐浏览器的。
SVG报错error on line 39 at column 26: Namespace prefix xlink for href on script is not defined的更多相关文章
- open数据库报错ERROR at line 1: ORA-03113: end-of-file on communication channel Process ID: 3880 Session ID: 125 Serial number: 3
1.今天打开数据时,失败,报错 ERROR at line 1:ORA-03113: end-of-file on communication channelProcess ID: 3880Sessi ...
- windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help
windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help 在windows8操作系统上安装 ...
- 【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line for Test1.test or also for JUnit default configuration.
idea启动测试类报错 Error running 'Test1.test': Command line is too long. Shorten command line for Test1.tes ...
- Hive 报错 Error while compiling statement: FAILED: ParseException line 1:0 character '' not supported here (state=42000,code=40000)
Hive报错 Error while compiling statement: FAILED: ParseException line 1:0 character '' not supported h ...
- 运行springboot项目报错 Error running 'ResourceApplication': Command line is too long. Shorten comma
方法1 IDEA 运行报错:Error running '***': Command line is too long 技术标签: IDEA Error running 'Test': Com ...
- MySQL报错ERROR 1558 (HY000): Column count of mysql.user is wrong.
MySQL报错ERROR 1558 (HY000): Column count of mysql.user is wrong. 1.今天在使用MySQL创建数据库时出现如下报错: mysql> ...
- [原]在使用ubuntu14.04,安装devstack的时候报错./stack.sh: line 463: generate-subunit: command not found
=======在使用ubuntu14.04,安装devstack的时候报错./stack.sh: line 463: generate-subunit: command not found 2016- ...
- springboot启动报错,Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
报错: Error starting ApplicationContext. To display the conditions report re-run your application with ...
- linux使用wkhtmltopdf报错error while loading shared libraries:
官网提示 linux需要这些动态库.depends on: zlib, fontconfig, freetype, X11 libs (libX11, libXext, libXrender) 在li ...
随机推荐
- 【WIN10】Storyboard動畫板
源碼下載:http://yunpan.cn/cFJR5zcMNtBq6 访问密码 ac7a 使用Storyboard可以實現動畫效果. 1.仿照WINDOWS系統安裝時的等待畫面,不停更換背景顏色 ...
- 【51Nod 1190】最小公倍数之和 V2
http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1190 \[ \begin{aligned} &\sum_{i=a ...
- [CSAcademy]A-Game
题目大意: 给你一个只含字符'A'和'B'的串,A和B两人轮流对其中的子串染色,要求被染色的子串中不包含已经被染色的子串. 最后,如果一方染的'A'少,那么这一方胜: 如果双方染的'A'和'B'一样多 ...
- 如何在SpringBoot当中上传多个图片或者上传单个图片 工具类
如何在SpringBoot当中上传多个图片[上传多个图片 ] 附赠工具类 1.SpringBoot 上传图片工具类 public class SpringUploadUtil { /*** * 上传图 ...
- Mysql插入数据时,报错this is incompatible with sql_mode=only_full_group_by
Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'inform ...
- hdu 4918
第一道树的点分治. 感谢: http://blog.csdn.net/u013368721/article/details/40887575 首先,找出原图的重心(最大子树大小最小的点(如果作为根)) ...
- 某DP题目1
题意: 有n个由左右括号组成的字符串,选择其中若干字符串,使得组成的括号序列合法且长度最长.n <= 1000,n个字符串的长度和 <= 10000. 分析: 其实我一开始做这一题的时候, ...
- 内功心法 -- java.util.LinkedList<E> (4)
写在前面的话:读书破万卷,编码如有神--------------------------------------------------------------------下文主要对java.util ...
- PHP 基础函数(二)数组的内部指针
current($arr); 返回数组中的当前单元pos($arr); 返回数组中的当前单元key($arr); 返回数组中当前单元的键名prev($arr); 将数组中的内部指针倒回一位ne ...
- 探究react-native 源码的图片缓存
先看js端图片使用的三种方式,依次排序1.2.3 <Image source={{uri:url}} style={{width:200,height:200}}/> 1. 加载远程图片 ...