【问题标题】:Making SVG Image Responsive Using Raphael使用 Raphael 使 SVG 图像具有响应性
【发布时间】:2013-08-30 14:02:09
【问题描述】:

我有一张非洲大陆的 SVG 图像,我想做出响应, 图像为 1500 像素 x 1500 像素。我使用 Rapheal 的 ImportSVG 库扩展来利用我的 SVG:

jQuery(document).ready(function () {
    jQuery.ajax({
        type: "GET",
        url: "Content/Blank_Map-Africa.svg",
        dataType: "xml",
        success: function (svgXML) {
            var paper = Raphael(150, 150, 1500, 1500);

            var newSet = paper.importSVG(svgXML);

            var world = paper.setFinish();
        }
    });
});

我找到了这个library,但不确定如何将它包含在我的项目中。

【问题讨论】:

标签: jquery svg raphael


【解决方案1】:

这是一个类似的问题:

Cross-browser SVG in responsive or fluid layout?

我相信使用提到的Article 可以解决您的问题

【讨论】:

    猜你喜欢
    • 2015-07-22
    • 2011-10-03
    • 2015-07-13
    • 2016-12-18
    • 1970-01-01
    • 2015-08-28
    • 1970-01-01
    • 1970-01-01
    • 2018-08-04
    相关资源
    最近更新 更多