<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?

      时间:2023-09-30
            <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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:在base64编码之前缩短字符串以使其更短的无损压缩方法? 下一篇:在 node.js 中解码 Base64 字符串

                相关文章

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

              2. <tfoot id='v4uCf'></tfoot>

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

                  <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>