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

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

    <tfoot id='ebYpG'></tfoot>
        <legend id='ebYpG'><style id='ebYpG'><dir id='ebYpG'><q id='ebYpG'></q></dir></style></legend>

        UIWebView 底部出现黑线.如何去除?

        时间:2023-10-21
        1. <tfoot id='nerkB'></tfoot>

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

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

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

                1. 本文介绍了UIWebView 底部出现黑线.如何去除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在嵌入在表格单元格中的 web 视图中呈现一些 html.出于某种原因,webview 底部有一条黑线.我尝试将 webview 及其滚动视图的背景颜色设置为白色,但这并没有改变任何东西.有没有人见过这个?

                  I am rendering some html in a webview that is embedded in a table cell. For some reason there is a black line at the bottom of the webview. I tried setting the background color of the webview and its scrollview to white but this did not change anything. Has anyone seen this before?

                  这是正在呈现的 HTML:

                  Here is the HTML that is being rendered:

                  <html>
                  <head>
                  
                      <style type="text/css">
                  a {text-decoration:none;background-color:white;}
                      </style>
                  
                      <title></title>
                  </head>
                  
                  <body style="margin:0;padding:0;background-color:white;">
                      <a href="http://body/" style=
                      "font-family:HelveticaNeue-Light;font-size:20.000000;color:black;-webkit-tap-highlight-color:rgba(0,0,0,0);">
                      Portland Blazers vs Golden State Warriors | FULL Highlights | January 26 ,
                      2014 | NBA 2013-14 Season</a><span style=
                      "font-family:HelveticaNeue;font-size:12.000000;color:rgb(102,102,102);white-space:nowrap;"><a href="https://www.youtube.com/watch?v=2TfldZ4w57E&amp;feature=youtube_gdata_player"
                      style=
                      "font-family:HelveticaNeue;font-size:12;color:rgb(102,102,102);-webkit-tap-highlight-color:rgba(0,0,0,0);"><img height="12"
                      src="file:link@2x.png" width="20">www.youtube.com</a></span>
                  </body>
                  </html>
                  

                  这是在 iOS7 上.

                  This is on iOS7.

                  更新:我仍然不确定是什么导致了黑线出现,但我设法通过更改我设置布局约束的方式来摆脱它.在我为视图周围的间距设置约束并让布局系统确定视图的大小之前.当 webview 完成加载其内容时,我将其更改为显式设置 webview 的高度约束.这似乎已经解决了这个问题,但我仍然不明白黑线是从哪里来的.

                  UPDATE: I'm still not sure what is causing the black line to appear but I managed to get rid of it by changing how I setup my layout constraints. Before I was setting constraints for the spacing around the views and letting the layout system figure out the size that the view should be. I changed it to explicitly set a height constraint of the webview when the webview finishes loading its content. This seems to have fixed the issue but I still do not understand where the black line was coming from.

                  推荐答案

                  我有同样的问题解决方案如下:

                  1. 设置UIWebView的 opaqueNO
                  2. UIWebView的 backgroundcolor设置为clear color.
                  1. Set UIWebView's opaque to NO
                  2. Set UIWebView's backgroundcolor to clear color.

                  注意:以上提供的两件事都是必需的.

                  使用上述方案时的其他解决方案

                  webView.scrollView.backgroundColor = UIColor.whiteColor()
                  

                  HTML 头部标签中的元数据

                  The meta to go in the head tag of HTML

                  <meta name="viewport" content="initial-scale=1, maximum-scale=1">
                  

                  这篇关于UIWebView 底部出现黑线.如何去除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:UIWebView 加载进度并调整网页以适应视图页面? 下一篇:UIWebView 在旋转后调整文本大小:寻找神奇错误或我的愚蠢的解释

                  相关文章

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

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

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

                      <tfoot id='U2yHU'></tfoot>