<small id='LAcqM'></small><noframes id='LAcqM'>

    <legend id='LAcqM'><style id='LAcqM'><dir id='LAcqM'><q id='LAcqM'></q></dir></style></legend>

    1. <tfoot id='LAcqM'></tfoot>
    2. <i id='LAcqM'><tr id='LAcqM'><dt id='LAcqM'><q id='LAcqM'><span id='LAcqM'><b id='LAcqM'><form id='LAcqM'><ins id='LAcqM'></ins><ul id='LAcqM'></ul><sub id='LAcqM'></sub></form><legend id='LAcqM'></legend><bdo id='LAcqM'><pre id='LAcqM'><center id='LAcqM'></center></pre></bdo></b><th id='LAcqM'></th></span></q></dt></tr></i><div id='LAcqM'><tfoot id='LAcqM'></tfoot><dl id='LAcqM'><fieldset id='LAcqM'></fieldset></dl></div>
        <bdo id='LAcqM'></bdo><ul id='LAcqM'></ul>
    3. 即时创建数据 URI?

      Create data URIs on the fly?(即时创建数据 URI?)
            <bdo id='cAHsu'></bdo><ul id='cAHsu'></ul>

              <tbody id='cAHsu'></tbody>
            <i id='cAHsu'><tr id='cAHsu'><dt id='cAHsu'><q id='cAHsu'><span id='cAHsu'><b id='cAHsu'><form id='cAHsu'><ins id='cAHsu'></ins><ul id='cAHsu'></ul><sub id='cAHsu'></sub></form><legend id='cAHsu'></legend><bdo id='cAHsu'><pre id='cAHsu'><center id='cAHsu'></center></pre></bdo></b><th id='cAHsu'></th></span></q></dt></tr></i><div id='cAHsu'><tfoot id='cAHsu'></tfoot><dl id='cAHsu'><fieldset id='cAHsu'></fieldset></dl></div>

                <legend id='cAHsu'><style id='cAHsu'><dir id='cAHsu'><q id='cAHsu'></q></dir></style></legend>
              1. <tfoot id='cAHsu'></tfoot>

                <small id='cAHsu'></small><noframes id='cAHsu'>

                本文介绍了即时创建数据 URI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                Is there a script (javascript / client side). That create data URIs on the fly. Now i create data URIs with a online base64 creator. And then put that output in the css file. But when i changing the images. Its a lot of work to do it. Is there a script, that can do it for me.?

                解决方案

                The modern browsers now have good support for base64 encoding and decoding. There are two functions respectively for decoding and encoding base64 strings:

                • atob() decodes a string of base-64 data
                • btoa() creates a base-64 encoded ASCII string from a "string" of binary data

                This let's you create data uri's easily i.e

                var longText = "Lorem ipsum....";
                var dataUri = "data:text/plain;base64," + btoa(longText);
                //a sample api expecting an uri
                d3.csv(dataUri, function(parsed){
                
                });
                

                这篇关于即时创建数据 URI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Fetch multiple links inside foreach loop(在 foreach 循环中获取多个链接)
                Backbone Fetch Request is OPTIONS method(Backbone Fetch Request 是 OPTIONS 方法)
                Fetch API leaks memory in Chrome(Fetch API 在 Chrome 中泄漏内存)
                How can I download and save a file using the Fetch API? (Node.js)(如何使用 Fetch API 下载和保存文件?(Node.js))
                Send blob data to node using fetch, multer, express(使用 fetch、multer、express 将 blob 数据发送到节点)
                Sending a custom User-Agent string along with my headers (fetch)(发送自定义用户代理字符串以及我的标头(获取))
                <legend id='v4uCf'><style id='v4uCf'><dir id='v4uCf'><q id='v4uCf'></q></dir></style></legend>

                • <tfoot id='v4uCf'></tfoot>

                    1. <small id='v4uCf'></small><noframes id='v4uCf'>

                        <tbody id='v4uCf'></tbody>
                      <i id='v4uCf'><tr id='v4uCf'><dt id='v4uCf'><q id='v4uCf'><span id='v4uCf'><b id='v4uCf'><form id='v4uCf'><ins id='v4uCf'></ins><ul id='v4uCf'></ul><sub id='v4uCf'></sub></form><legend id='v4uCf'></legend><bdo id='v4uCf'><pre id='v4uCf'><center id='v4uCf'></center></pre></bdo></b><th id='v4uCf'></th></span></q></dt></tr></i><div id='v4uCf'><tfoot id='v4uCf'></tfoot><dl id='v4uCf'><fieldset id='v4uCf'></fieldset></dl></div>
                        <bdo id='v4uCf'></bdo><ul id='v4uCf'></ul>