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 ...
随机推荐
- Jenkins多选项框使用
多选框的使用场景还是挺多的,比如发布多个服务,或者选择哪些服务器 想要使用多选项,则需要安装插件extend choice parameter,然后在项目中配置参数化构建过程 配置完上面,我们就可以在 ...
- 类命名空间与对象、实例的命名空间 and 面向对象的组合用法
类命名空间与对象.实例的命名空间 创建一个类就会创建一个类的名称空间,用来存储类中定义的所有名字,这些名字称为类的属性 而类有两种属性:静态属性和动态属性 静态属性就是直接在类中定义的变量 动态属性就 ...
- 【BZOJ 2916】 2916: [Poi1997]Monochromatic Triangles (容斥)
2916: [Poi1997]Monochromatic Triangles Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 310 Solved: 1 ...
- PHP 笔记——会话控制
1. Session的操作 1.1 启动 Session session_start(void):bool 1.2 注册 Session 会话变量启动后,全部被保存在全局数组$_SESSION[]中. ...
- Neo4j之Cypher学习总结
Cypher 语句 Cypher是图形数据库Neo4j的声明式查询语言. Cypher语句规则和具备的能力: Cypher通过模式匹配图数据库中的节点和关系,来提取信息或者修改数据. Cypher语句 ...
- fpdf中文乱码,添加字符集
中文乱码 引入Olivier的chinese.php(点击下载) 支持中文,其中有Big5,GB两种 使用方法也很简单 $pdf->AddBig5Font(); $pdf->SetFont ...
- mysql root密码忘了怎么办?
服务器多起来,密码也就多了,多到自己记不住了,也忘记存哪里了.昨天刚刚下载了KeePass来管理密码,不过为时已晚,我已经忘记了mysql的root密码.好惨好惨,难道还要重装么.还好,有一种方法可以 ...
- 直接拿来用!最火的iOS开源项目(一~三)
结束了GitHub平台上“最受欢迎的Android开源项目”系列盘点之后,我们正式迎来了“GitHub上最受欢迎的iOS开源项目”系列盘点.今天,我们将介绍20个在GitHub上非常受开发者欢迎的iO ...
- TJU 2248. Channel Design 最小树形图
最小树形图,測模版.... 2248. Channel Design Time Limit: 1.0 Seconds Memory Limit: 65536K Total Runs: 2199 ...
- Android SDK最小需求
As a minimum when setting up the Android SDK, you should download the latest tools and Android platf ...