如何在SVG中制作自适应iframe

时间:2018-10-05 12:15:30

标签: svg iframe responsive

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="UTF-8" />
            <title>SVG Included with
                <object> tag</title>
    </head>
    <body>
        <object type="image/svg+xml" data="home.svg" id="global">
        </object>
    </body>
</html>


<?xml version="1.0" standalone="no"?>
    <svg  checksum="fa5cb5c38fd882d14b6b09f2c164ac3a4f0dbaef21d4cae1a02db8d7a30b3cd6" width="950px" height="599px" style="background:rgb(128,0,16)" 
    xmlns="http://www.w3.org/2000/svg" 
    xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" >
  <g>
    <foreignObject id="grafana1" xmlns="http://www.w3.org/2000/svg"  width="500" height="200" x="550" y="50" >
        <body xmlns="http://www.w3.org/1999/xhtml" >
            <iframeemphasized text xmlns="http://www.w3.org/1999/xhtml" width="500" height="200" src="https://play.grafana.org/d-solo/000000012/grafana-play-home?panelId=4&amp;orgId=1&amp;from=1533972607993&amp;to=1533973023514" frameborder="0"></iframe>
        </body>
    </foreignObject>
  </g>
</svg>

在此iframe中,如果我们放大或缩小HTML页面,则无响应。那么,如何使其具有响应性?

0 个答案:

没有答案