一、在HTML中嵌入SVG

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form >
    <div>
    <p>
    This shows a simple html document with an svg document included by reference.
    </p>
    <embed src="test.svg" width="100%" height="100%" align="center"></embed>
    </div>
    </form>
</body>
</html>
二、使用对象元素
    <object type="image/svg + xml" data="test.svg" width="300" height="200" align="top"></object>
在引用SVG只有两件事会出错:
1.SVG文件本身无效哦奥,或没有正确的命名这个文件,
2.url="   ";引用不到文件。
产生的错误是客户端的无反馈信息,漫长的等待。

相关文章:

  • 2022-12-23
  • 2021-09-02
  • 2021-04-17
  • 2022-01-12
  • 2021-07-30
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-08
  • 2022-03-07
  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
相关资源
相似解决方案