SVG的marker-end显示不出来的问题
来源:互联网 发布:安度因漫画知乎 编辑:程序博客网 时间:2024/04/27 15:23
问题描述:
用d3画的图,svg和div重叠画的,svg画连线和箭头,div上用d3来append出个性化的展示面板,项目首页有 <base href="/">
,d3生成的svg的标签文件单独复制出来后可以看到箭头(marker-end)!
解决方案
The HTML element is used to say “resolve all relative URLs relative not to this page, but to a new location”. In your case, you’ve told it to resolve relative to the directory with the HTML page.
The SVG marker-mid=”url(…)” attribute is a FuncIRI Reference. When you use a value like url(#foo) that relative IRI is normally resolved relative to the current page, finding the element with the foo id. But, when you use , you change where it looks.
To solve this problem, use a better value. Since your base reference is the current directory, you can simply use the name of the current file:
<line … marker-mid="url(this_page_name.html#arrow)" />
If you have a different href, than what you’ve shown, like:
<base href="http://other.site.com/whee/" />
then you will need to use an absolute href, e.g.
<line … marker-mid="url(http://my.site.com/this_page_name.html#arrow)" />
如果用的Angular, 可以用$location.path!
- SVG的marker-end显示不出来的问题
- 在eclipse中显示不出来.svg格式的图片
- 高德地图自定义marker不显示的问题
- 图片显示不出来的怪问题
- WORD图标显示不出来的问题
- listview头部显示不出来的问题
- TOMCAT5中文名称的资源显示不出来的问题
- 图片验证码显示不出来的问题
- 有关Yii form 显示不出来 model找不到的问题
- easyui中不显示出来的一个问题
- Android List divider显示不出来的问题
- jasper iReport 图片web分页显示不出来的问题
- uilabel字体显示不出来的问题备忘
- 关于今天扩展界面不显示出来的问题
- 适配9patch图片 内容显示不出来的问题
- jsp里面相对路径显示不出来图的问题
- 解决java中jfreechart汉字显示不出来的问题
- Android 百度地图marker中图片不显示的解决方案
- 关于pthread_mutex_consistent的使用
- SSIS
- 数字增加动画
- 搭建spark开发环境
- 切换CSS实现开/关按钮切换
- SVG的marker-end显示不出来的问题
- 使用Realm实现Extension&Host共享数据
- iOS支付宝支付基于https
- App Transport Security has blocked a cleartext HTTP问题的解决
- 删除一个表中和另一个表相同的记录
- Java中的Enum(枚举)的使用与分析
- Centos部署java项目环境
- CATransition 翻页效果
- Highcharts的一些基本设置