• <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;显示图像

        Is it safe to use lt;a href=quot;data; ...quot;gt; to display images?(使用 lt;a href=quot;data; 是否安全?...gt;显示图像?)
              <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;显示图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)
                  How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?(如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?) - IT屋-程序员软件开发技术分享社
                  Scale background image to fit ie8 window(缩放背景图像以适合 ie8 窗口)
                  Safari 5.1 breaks CSS table cell spacing(Safari 5.1 打破 CSS 表格单元格间距)
                  Put in bold part of description in metatag Drupal module(将描述的粗体部分放在元标记 Drupal 模块中)
                  How to get file size of newly created Image() if src is base64 string?(如果 src 是 base64 字符串,如何获取新创建的 Image() 的文件大小?)
                    <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>

                        <tbody id='Rx6YD'></tbody>

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

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