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

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

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

        <legend id='yRrLn'><style id='yRrLn'><dir id='yRrLn'><q id='yRrLn'></q></dir></style></legend>
      1. 使用 &lt;a href=&quot;data; 是否安全?..."&gt;显示图像

        时间:2023-09-30
              <bdo id='4jyfy'></bdo><ul id='4jyfy'></ul>
              • <tfoot id='4jyfy'></tfoot>
                  <tbody id='4jyfy'></tbody>

                <small id='4jyfy'></small><noframes id='4jyfy'>

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

                <legend id='4jyfy'><style id='4jyfy'><dir id='4jyfy'><q id='4jyfy'></q></dir></style></legend>

                • 本文介绍了使用 &lt;a href=&quot;data; 是否安全?..."&gt;显示图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I've learned that it's possible to embed an image in an HTML page like so, instead of linking to a separate image file:

                  <a href="data:image/png;base64,...(blah blah base64-encoded png goes here)..."
                    width="70" height="38" alt="image embedded using base64 encoding!"></a>
                  

                  Is this "safe", as in will all modern browsers be able to view the image, as long as I stick to common formats like PNG/JPG? Are there any downsides, other than base64-encoding the image increasing the image size by a bit?

                  Thanks.

                  解决方案

                  Yes, this is safe - all major browsers support the data URI scheme.

                  One downside is that if you use the same image a number of times in the page, it will be encoded several times vs downloaded once.

                  Another is the size limit imposed by some browsers (IE 8 only allows up to 32k).

                  You can also use this in CSS to mitigate the download issue.

                  这篇关于使用 &lt;a href=&quot;data; 是否安全?..."&gt;显示图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:为什么在 crossOrigin = 'Anonymous' 图像上设置 base64 数据时,Safa 下一篇:如何使用 node-imap 读取和保存附件

                  相关文章

                    <bdo id='Rx6YD'></bdo><ul id='Rx6YD'></ul>
                • <small id='Rx6YD'></small><noframes id='Rx6YD'>

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

                    <tfoot id='Rx6YD'></tfoot>

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