HTML中嵌入SVG图片的N种方式
2018-03-17 00:22
204 查看
最近用到了个SVG图片,里面还是带
<image>标签的,想要把它嵌入到HTML中还是有些工作要做的。
经历
最初的图片是这样写的:<?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 version="1.1" preserveAspectRatio="xMinYMin meet" width="660" height="342" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <image xlink:href="https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/bd_logo1_31bdc765.png" width="660" height="342"/> <rect x="2" y="284" width="656" height="58" fill="rgba(0,0,0,0.6)" stroke-width="1" ></rect> <text text-anchor="start" font-family="Microsoft Yahei, sans-serif" font-size="28" x="20" y="322" fill="#fff">这是百度</text> <text text-anchor="end" font-family="Microsoft Yahei, sans-serif" font-size="28" x="640" y="322" fill="#fff">
相关文章推荐
- SVG 入门 及 嵌入HTML的7种方式
- SVG系列教程:SVG简介与嵌入HTML页面的方式
- 在html页面中嵌入SVG的几种方式
- svg嵌入到html中的几种方式
- SVG系列教程:SVG简介与嵌入HTML页面的方式
- .NET C# 异步发送 要求回执 嵌入图片资源 自定义邮件头 失败通知 html/文本双视图 支持 notes 的邮件
- JavaScript在HTML中的嵌入方式
- [Flex] IFrame系列 —— 嵌入本地页面两种方式source和content(html页面和html代码)
- webvector将html转为svg或者png图片的工具
- 在HTML文档中嵌入CSS的三种常用方式
- html 图片显示的几种方式
- 在HTML文档中嵌入CSS的几种方式
- 在HTML文档中嵌入CSS的三种常用方式
- html网页中load载入图片的方式
- 在HTML中嵌入服务器端C#代码的方式
- MailBee.NET ObjectsL显示HTML/纯文本邮件教程(三):显示带嵌入图片的邮件
- SVG 图形嵌入html页面
- 在html页面中直接嵌入图片数据
- HTML中嵌入css的三种方式
- 如何将图片嵌入到Html中