代码之家  ›  专栏  ›  技术社区  ›  gtilflm

SVG中的CamanJS?

  •  0
  • gtilflm  · 技术社区  · 6 年前

    http://camanjs.com/guides/ )或其他类似的工具 <svg>

    示例代码如下。。。

    <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="624" height="793" id="svg_3162" style="width: 639px;">
        <desc>Created with Rapha�l</desc>
        <defs></defs>
        <rect x="15" y="150" width="24" height="24" r="0" rx="0" ry="0" fill="#ff0000" stroke="none"></rect>
        <rect x="7" y="174" width="24" height="24" r="0" rx="0" ry="0" fill="#000000" stroke="none"></rect>
        MORE SVG STUFF
        <image x="35" y="0" width="600" height="769" preserveAspectRatio="none" xlink:href="https://s3.amazonaws.com/path/to/image.jpg"></image>
        MORE SVG STUFF
    </svg>
    

    <image> 在中标记 <svg> 标签似乎是个问题。有人知道卡曼吉斯能不能用这个?或者如果有类似的东西可以在这种情况下工作?

    1 回复  |  直到 6 年前
        1
  •  0
  •   Shailendra Gupta    6 年前

    使用foreignObject并设置高度、宽度、x和y位置

    <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="624" height="793" id="svg_3162" style="width: 639px;">
    <desc>Created with Rapha�l</desc>
    <defs></defs>
    <rect x="15" y="150" width="24" height="24" r="0" rx="0" ry="0" fill="#ff0000" stroke="none"></rect>
    <rect x="7" y="174" width="24" height="24" r="0" rx="0" ry="0" fill="#000000" stroke="none"></rect>
    MORE SVG STUFF
    

    更多SVG内容

    推荐文章